summary refs log tree commit diff stats
path: root/lib/system/threads.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/threads.nim')
-rw-r--r--lib/system/threads.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim
index c30c57fb9..7dac9d9aa 100644
--- a/lib/system/threads.nim
+++ b/lib/system/threads.nim
@@ -353,8 +353,7 @@ when hostOS == "windows":
     t.sys = createThread(nil, ThreadStackSize, threadProcWrapper[TArg],
                          addr(t), 0'i32, dummyThreadId)
     if t.sys <= 0:
-      raise newException(EResourceExhausted, "cannot create thread")
-
+      raise newException(ResourceExhaustedError, "cannot create thread")
 else:
   proc createThread*[TArg](t: var TThread[TArg], 
                            tp: proc (arg: TArg) {.thread.}, 
@@ -369,7 +368,7 @@ else:
     pthread_attr_init(a)
     pthread_attr_setstacksize(a, ThreadStackSize)
     if pthread_create(t.sys, a, threadProcWrapper[TArg], addr(t)) != 0:
-      raise newException(EResourceExhausted, "cannot create thread")
+      raise newException(ResourceExhaustedError, "cannot create thread")
 
 proc threadId*[TArg](t: var TThread[TArg]): TThreadId[TArg] {.inline.} =
   ## returns the thread ID of `t`.