* Jean-Yves Lefort -- Sunday 05 March 2006 03:06:
> The attached patch fixes a crash which occurs on exit.
Anyone else seeing this "crash" (which really is a deliberate abort())?
Or is it a BSD feature?
> In the FGMetarEnvironmentCtrl destructor, thread->cancel() causes the
> following thread->join() call to return without actually waiting on
> the thread (btw, thread->cancel() does not cause the thread to exit).
It causes the thread to to be left at the next cancellation point,
that would be the wait() in the SGBlockingQueue::pop. So the guarded
mutex should automatically be unlocked and the thread left. That's
according to the documentation and works here.
> +FGMetarEnvironmentCtrl::stop()
> +{
> + request_queue.push( string() ); // ask metar thread to terminate
> + thread->join();
> +}
This doesn't make sense to me. You want to push an empty string
for the wait() to function as cancellation point? It should work
as such without that.
m. :-/
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel