summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
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()