[Live-devel] Re: One (maybe two) little bug in Makefile.tail

Ross Finlayson finlayson at live.com
Wed Mar 31 09:19:54 PST 2004


Matteo,

Thanks for noting the Makefile problem; it has been fixed in the most 
recent release (2004.03.27).

>In the main() I create with pipe() function two fd (We can call them
>rd_fd and wr_fd).
>
>in the live-thread I add
>   env->taskScheduler().turnOnBackgroundReadHandling(rd_fd,NULL,NULL);
>before
>   env->taskScheduler().doEventLoop(stop);
>
>with this trick when I want to fast shutdown live-thread from pilot-thread
>   into pilot-thread I perform:
>     set the watchVariable of live-thread
>     write(wr_fd,"w",1);
>
>with this trick the select() return and the check of watchVariable shutdown
>without delay the thread-live.

But if you *don't* call "write(wr_fd,"w",1);", exactly the same thing will 
happen: When you return to the event loop (see 
"BasicTaskScheduler0::doEventLoop()"), the watch variable will be non-zero, 
and you'll return from the event loop.  Creating the 'fd's, and calling 
"turOnBackgroundReadHandling()" adds nothing.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list