put std/threads under the umbrella of nimPreviewSlimSystem (#20711)

* put `std/threads` under the umbrella of `nimPreviewSlimSystem`

* add changelog

* fixes tests

* fixes tests again

* fixes tests
This commit is contained in:
ringabout
2022-10-31 13:36:50 +08:00
committed by GitHub
parent fb2ec8d192
commit e1ddd2d524
13 changed files with 33 additions and 19 deletions

View File

@@ -95,16 +95,6 @@ when defined(zephyr):
proc onThreadDestruction*(handler: proc () {.closure, gcsafe, raises: [].}) =
## Registers a *thread local* handler that is called at the thread's
## destruction.
##
## A thread is destructed when the `.thread` proc returns
## normally or when it raises an exception. Note that unhandled exceptions
## in a thread nevertheless cause the whole process to die.
nimThreadDestructionHandlers.add handler
{.push stack_trace:off.}
when defined(windows):
proc threadProcWrapper[TArg](closure: pointer): int32 {.stdcall.} =