loader: On Mac, reserve the process's original thread for the frameworks. (try 2)
Alexandre Julliard
julliard at winehq.org
Fri Nov 12 05:14:39 CST 2010
Ken Thomases <ken at codeweavers.com> writes:
> + {
> + CFRunLoopAddSource( CFRunLoopGetMain(), source, kCFRunLoopCommonModes );
> + CFRunLoopSourceSignal( source );
> + CFRunLoopWakeUp( CFRunLoopGetMain() );
> + CFRelease( source );
> +
> + /* This is a hack. We want to wait until the main thread has
> + * really exited in response to our signal. However, Mac OS X
> + * doesn't let us join the main thread for whatever reason.
> + * It results in a SIGBUS. So, we just sleep for a bit and hope
> + * it got enough time. */
> + usleep(100);
We need something more reliable than this.
(The pthread_join crash is a bug in libsystem, I filed a bug a while
back but haven't heard anything).
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list