فهرست منبع

added missing mutex wait on linux thread create (see #586)

Nicolas Cannasse 2 سال پیش
والد
کامیت
6d0af2eddc
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/std/thread.c

+ 2 - 0
src/std/thread.c

@@ -868,6 +868,8 @@ HL_PRIM hl_thread *hl_thread_start( void *callback, void *param, bool withGC ) {
 		return NULL;
 	}
 	pthread_attr_destroy(&attr);
+	if( withGC )
+		hl_lock_wait(((thread_start*)param)->wait, NULL);
 	return (hl_thread*)t;
 #endif
 }