remove thread duplicated code (#22348)

This commit is contained in:
Bung
2023-07-31 16:58:59 +08:00
committed by GitHub
parent 281016a802
commit d51bc084fd

View File

@@ -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() =