mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-01-31 05:25:09 +00:00
prepare nim-chronos for Nim version 1.2
This commit is contained in:
parent
7ed9f1431a
commit
f3827a13d1
@ -30,7 +30,7 @@ template createCb(retFutureSym, iteratorNameSym,
|
||||
|
||||
var nameIterVar = iteratorNameSym
|
||||
{.push stackTrace: off.}
|
||||
proc identName(udata: pointer = nil) {.closure.} =
|
||||
proc identName(udata: pointer = nil) {.closure, gcsafe.} =
|
||||
try:
|
||||
if not(nameIterVar.finished()):
|
||||
var next = nameIterVar()
|
||||
@ -48,7 +48,7 @@ template createCb(retFutureSym, iteratorNameSym,
|
||||
else:
|
||||
{.gcsafe.}:
|
||||
{.push hint[ConvFromXtoItselfNotNeeded]: off.}
|
||||
next.callback = CallbackFunc(identName)
|
||||
next.callback = identName
|
||||
{.pop.}
|
||||
except CancelledError:
|
||||
retFutureSym.cancel()
|
||||
|
@ -11,8 +11,8 @@ import ../chronos
|
||||
when defined(nimHasUsed): {.used.}
|
||||
|
||||
suite "Asynchronous sync primitives test suite":
|
||||
var testLockResult = ""
|
||||
var testEventResult = ""
|
||||
var testLockResult {.threadvar.}: string
|
||||
var testEventResult {.threadvar.}: string
|
||||
var testQueue1Result = 0
|
||||
var testQueue2Result = 0
|
||||
var testQueue3Result = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user