This commit is contained in:
Araq 2020-03-10 10:39:43 +01:00 • committed by Andreas Rumpf
commit 861a5340fe
7 changed files with 37 additions and 7 deletions

View file

@ -278,7 +278,7 @@ when defined(windows) or defined(nimdoc):
result.ioPort = createIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 1)
result.handles = initSet[AsyncFD]()
result.timers.newHeapQueue()
result.callbacks = initDeque[proc ()](64)
result.callbacks = initDeque[proc () {.closure, gcsafe.}](64)
var gDisp{.threadvar.}: owned PDispatcher ## Global dispatcher

View file

@ -46,7 +46,7 @@ template createCb(retFutureSym, iteratorNameSym,
else:
{.gcsafe.}:
{.push hint[ConvFromXtoItselfNotNeeded]: off.}
next.callback = (proc() {.closure, gcsafe.})(identName)
next.callback = cast[proc() {.closure, gcsafe.}](identName)
{.pop.}
except:
futureVarCompletions