From 83e26cc4fa68f5af26301a75be9781bf007663c1 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Thu, 18 Sep 2014 18:04:07 +0100 Subject: [PATCH] Fixes asyncnet example. --- lib/pure/asyncnet.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index cc7f096eb8..72fe51a7ef 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -31,7 +31,7 @@ ## ## import asyncnet, asyncdispatch ## -## var clients: seq[AsyncSocket] = @[] +## var clients {.threadvar.}: seq[AsyncSocket] ## ## proc processClient(client: AsyncSocket) {.async.} = ## while true: @@ -40,6 +40,7 @@ ## await c.send(line & "\c\L") ## ## proc serve() {.async.} = +## clients = @[] ## var server = newAsyncSocket() ## server.bindAddr(Port(12345)) ## server.listen()