Explorar o código

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

Nicolas Cannasse %!s(int64=2) %!d(string=hai) anos
pai
achega
6d0af2eddc
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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
 }