asyncdispatch: for NuttX, add destructor to clear global dispatcher. (#21432)

* asyncdispatch: for NuttX, add destructor to clear global dispatcher using atexit().

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>

* std: exitprocs: remove "when defined(nuttx)" block.

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>

---------

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
This commit is contained in:
Century Systems
2023-02-28 22:38:50 +09:00
committed by GitHub
parent 83e3320725
commit dd629c8f45
2 changed files with 13 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ proc callClosures() {.noconv.} =
case fun.kind
of kClosure: fun.fun1()
of kNoconv: fun.fun2()
gFuns.setLen(0)
template fun() =
if gFuns.len == 0: