summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-09-18 18:04:07 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-09-18 18:04:07 +0100
commit83e26cc4fa68f5af26301a75be9781bf007663c1 (patch)
treeaec25c86fa95bc3c10718516a82c97ce9c905189 /lib/pure
parent867dfbfbfa68c61a2b65d46af7c22aa47857fa21 (diff)
downloadNim-83e26cc4fa68f5af26301a75be9781bf007663c1.tar.gz
Fixes asyncnet example.
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/asyncnet.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim
index cc7f096eb..72fe51a7e 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()