Dont assert on setstacksize result in iOS (#15427) [backport:1.2]
This commit is contained in:
parent
5f9b366180
commit
22d0a39932
1 changed files with 4 additions and 1 deletions
|
|
@ -319,7 +319,10 @@ else:
|
||||||
when hasSharedHeap: t.core.stackSize = ThreadStackSize
|
when hasSharedHeap: t.core.stackSize = ThreadStackSize
|
||||||
var a {.noinit.}: Pthread_attr
|
var a {.noinit.}: Pthread_attr
|
||||||
doAssert pthread_attr_init(a) == 0
|
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:
|
if pthread_create(t.sys, a, threadProcWrapper[TArg], addr(t)) != 0:
|
||||||
raise newException(ResourceExhaustedError, "cannot create thread")
|
raise newException(ResourceExhaustedError, "cannot create thread")
|
||||||
doAssert pthread_attr_destroy(a) == 0
|
doAssert pthread_attr_destroy(a) == 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue