mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-27 19:06:31 +00:00
@@ -31,6 +31,10 @@ when not defined(release):
|
||||
var currentID = 0
|
||||
|
||||
const isFutureLoggingEnabled* = defined(futureLogging)
|
||||
|
||||
const
|
||||
NimAsyncContinueSuffix* = "NimAsyncContinue" ## For internal usage. Do not use.
|
||||
|
||||
when isFutureLoggingEnabled:
|
||||
import hashes
|
||||
type
|
||||
@@ -294,7 +298,7 @@ proc getHint(entry: StackTraceEntry): string =
|
||||
if cmpIgnoreStyle(entry.filename, "asyncdispatch.nim") == 0:
|
||||
return "Processes asynchronous completion events"
|
||||
|
||||
if entry.procname.endsWith("_continue"):
|
||||
if entry.procname.endsWith(NimAsyncContinueSuffix):
|
||||
if cmpIgnoreStyle(entry.filename, "asyncmacro.nim") == 0:
|
||||
return "Resumes an async procedure"
|
||||
|
||||
|
||||
@@ -308,9 +308,9 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
||||
outerProcBody.add(closureIterator)
|
||||
|
||||
# -> createCb(retFuture)
|
||||
# NOTE: The "_continue" suffix is checked for in asyncfutures.nim to produce
|
||||
# NOTE: The NimAsyncContinueSuffix is checked for in asyncfutures.nim to produce
|
||||
# friendlier stack traces:
|
||||
var cbName = genSym(nskProc, prcName & "Continue")
|
||||
var cbName = genSym(nskProc, prcName & NimAsyncContinueSuffix)
|
||||
var procCb = getAst createCb(retFutureSym, iteratorNameSym,
|
||||
newStrLitNode(prcName),
|
||||
cbName,
|
||||
|
||||
Reference in New Issue
Block a user