We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b141c77 commit d7eb451Copy full SHA for d7eb451
machine/builtin/fiber.cpp
@@ -62,11 +62,17 @@ namespace rubinius {
62
pthread_attr_setstacksize(&attrs, stack_size()->to_native());
63
pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
64
65
- pthread_create(&vm()->os_thread(), &attrs,
+ int status = pthread_create(&vm()->os_thread(), &attrs,
66
Fiber::run, (void*)vm());
67
68
pthread_attr_destroy(&attrs);
69
70
+ if(status != 0) {
71
+ char buf[RBX_STRERROR_BUFSIZE];
72
+ char* err = RBX_STRERROR(status, buf, RBX_STRERROR_BUFSIZE);
73
+ Exception::raise_fiber_error(state, err);
74
+ }
75
+
76
// Wait for Fiber thread to start up and pause.
77
while(!vm()->suspended_p()) {
78
; // spin wait
0 commit comments