mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
Dont assert on setstacksize result in iOS (#15427) [backport:1.2]
(cherry picked from commit 22d0a39932)
This commit is contained in:
@@ -311,7 +311,10 @@ else:
|
||||
when hasSharedHeap: t.core.stackSize = ThreadStackSize
|
||||
var a {.noinit.}: Pthread_attr
|
||||
doAssert pthread_attr_init(a) == 0
|
||||
doAssert pthread_attr_setstacksize(a, ThreadStackSize) == 0
|
||||
let setstacksizeResult = pthread_attr_setstacksize(a, ThreadStackSize)
|
||||
when not defined(ios):
|
||||
# This fails on iOS
|
||||
doAssert(setstacksizeResult == 0)
|
||||
if pthread_create(t.sys, a, threadProcWrapper[TArg], addr(t)) != 0:
|
||||
raise newException(ResourceExhaustedError, "cannot create thread")
|
||||
doAssert pthread_attr_destroy(a) == 0
|
||||
|
||||
Reference in New Issue
Block a user