fix failed tests due to gcsafe

This commit is contained in:
Araq 2014-08-12 10:11:58 +02:00
commit 4d863ebb5e
7 changed files with 55 additions and 50 deletions

View file

@ -28,11 +28,13 @@ proc serve() {.async.} =
await processClient(fut)
when isMainModule:
var fut = serve()
fut.callback =
proc () =
if fut.failed:
# This test ensures that this exception crashes the application
# as it is not handled.
raise fut.error
runForever()
proc main =
var fut = serve()
fut.callback =
proc () =
if fut.failed:
# This test ensures that this exception crashes the application
# as it is not handled.
raise fut.error
runForever()
main()

View file

@ -5,7 +5,8 @@ discard """
"""
import sockets, asyncio, strutils, times
var disp = newDispatcher()
var disp {.threadvar.}: PDispatcher
disp = newDispatcher()
var msgCount = 0
when defined(ssl):