mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 06:54:16 +00:00
remove thread duplicated code (#22348)
This commit is contained in:
@@ -20,13 +20,8 @@ when not defined(useNimRtl):
|
||||
threadType = ThreadType.NimThread
|
||||
|
||||
when defined(gcDestructors):
|
||||
proc allocThreadStorage(size: int): pointer =
|
||||
result = c_malloc(csize_t size)
|
||||
zeroMem(result, size)
|
||||
|
||||
proc deallocThreadStorage(p: pointer) = c_free(p)
|
||||
else:
|
||||
template allocThreadStorage(size: untyped): untyped = allocShared0(size)
|
||||
template deallocThreadStorage(p: pointer) = deallocShared(p)
|
||||
|
||||
template afterThreadRuns() =
|
||||
|
||||
Reference in New Issue
Block a user