summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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