summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2020-09-29 17:55:53 +0300
committerGitHub <noreply@github.com>2020-09-29 16:55:53 +0200
commit22d0a3993268c334e62461f39ef02b1d02c64ca1 (patch)
treebbb6c13dbf15baa19ef68d5ed6e24de92e9dedc0 /lib
parent5f9b366180f86dec5362c6acb67defb58e2e1c93 (diff)
downloadNim-22d0a3993268c334e62461f39ef02b1d02c64ca1.tar.gz
Dont assert on setstacksize result in iOS (#15427) [backport:1.2]
Diffstat (limited to 'lib')
-rw-r--r--lib/system/threads.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim
index bf93b5e01..cd1cf5e29 100644
--- a/lib/system/threads.nim
+++ b/lib/system/threads.nim
@@ -319,7 +319,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