summary refs log tree commit diff stats
path: root/lib/std/exitprocs.nim
Commit message (Collapse)AuthorAgeFilesLines
* asyncdispatch: for NuttX, add destructor to clear global dispatcher. (#21432)Century Systems2023-02-281-0/+1
| | | | | | | | | | | | | * 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>
* stdlib organization & documentation improvements (#20971)metagn2022-12-061-0/+2
| | | | | | | | | | | | | | | | | * stdlib organization & documentation improvements * fix CI * Update doc/lib.md Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * fix ci, remove jshttpcore, export in jsfetch instead * fix alphabetical order violations * add cmdline, db_odbc Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* Freeing critical sections via atexit in system/alloc and system/io (#19062)Tail Wag Games2021-10-291-3/+0
| | | | | | | | | | | | | | | * adding new system module sysexitprocs and including system exit procedures when registering exit handlers defined in userland * fixing failing tests and adding initialization guard to handle cases where the module's global init logic isn't invoked first as is the case with some gc implementaions * js backend shouldn't try to invoke actual system exit procs * fixing formatting in sysexitprocs.nim * 256 was too much - my max number of plugins in my engine is 64 and I require two hooks per runtime it looks like with tls emulation turned off, so for my purposes 128 should be sufficient * so atExit should be enough here, can get rid of all the extra cruft I had added on top since I didn't realize atExit already provided a stack * done being cute - since newruntime prevents correct cpp codegen for object variants apparently and breaks tests if I try to use std/exitprocs, ddSysExitProc is just going into both modules. Since system doesn't include system/io, polluting system with it doesn't make sense either... at least it is only importc'd when it is required in either module and we don't have to have any weird when defined(nimOwnedEnabled) with a comment explaining why
* deinitializing locks at program exit (#19043)Tail Wag Games2021-10-251-0/+3
| | | | | | | | | | | | * deinitializing locks at program exit * deinitLock shouldn't be called for js backend I guess... * I suppose this is the best way to detect the ewruntime option * I guess I need these guards here too... * fixing merge conflict
* fix #14475; unittest.require now works with `nim c`; require and check now ↵Timothee Cour2020-07-141-0/+22
| | | | | | | | | | | | | works with -d:nodejs (#14676) * fix #14475; make unittest work with -d:nodejs * fixup * fixup * disable inim, delaunay which failed after unittest.require got fixed * re-enable tests that have been fixed
* `addQuitProc` now works with closures, and c, js(node/browser) backend; fix ↵Timothee Cour2020-06-161-0/+65
some bugs in testament (#14342) * make addQuitProc great again * fix bugs in testament * fix test * change 2016 => 2020 * addQuitProc => addExitProc + locks * move to std/exitprocs