Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Only enable for destructors
  • Loading branch information
SirOlaf committed Jul 25, 2024
commit 4afc7c4580df2914511ee0fb8b3450d26b3d6b39
4 changes: 2 additions & 2 deletions lib/system/threadimpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var
nimThreadDestructionHandlers* {.rtlThreadVar.}: seq[proc () {.closure, gcsafe, raises: [].}]
when not defined(boehmgc) and not hasSharedHeap and not defined(gogc) and not defined(gcRegions):
proc deallocOsPages() {.rtl, raises: [].}
when not defined(useMalloc):
when defined(gcDestructors):
proc abandonAllocator() {.rtl, raises: [].}
proc threadTrouble() {.raises: [], gcsafe.}
# create for the main thread. Note: do not insert this data into the list
Expand Down Expand Up @@ -95,7 +95,7 @@ proc threadProcWrapStackFrame[TArg](thrd: ptr Thread[TArg]) {.raises: [].} =
when declared(deallocOsPages): deallocOsPages()
else:
threadProcWrapDispatch(thrd)
when not defined(useMalloc):
when defined(gcDestructors):
abandonAllocator()

template nimThreadProcWrapperBody*(closure: untyped): untyped =
Expand Down