From: "Eustáquio 'TaQ' Rangel" Date: 2007-11-17T07:54:33+09:00 Subject: Re: Suggestion for native thread tests -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Sasada! > I can't understand what do you mean. Where is a FIFO? On my > laptop, this code doesn't block, but continues to show file contents. FIFO are named pipes. Here's the Wikipedia definition and some samples: http://en.wikipedia.org/wiki/Named_pipe On Linux it can be created with mkfifo thread_test.fifo It will create a pipe where you can send and read information. To make to stop the blocking, we need to send something to the FIFO, like echo "hi sasada!" > thread_test.fifo Check this out: on a terminal, type: mkfifo sasada.fifo tail -f sasada.fifo On another terminal, on the same dir, type: echo "hi" > sasada.info echo "sasada" > sasada.info Back to the first console, the result is: hi sasada Where it still wait for more contents till a ctrl+c. On my example the FIFO works like a blocking operation, where the second thread stops the other ones while there is no content to be read on the pipe. Using a similar code on Java, all the threads runs even if the second one stops waiting for some content. Don't know if this is a really valid example for checking for native thread stuff, but I think if we go native one thread should not stop the others. Best regards, - -- Eust�quio "TaQ" Rangel http://eustaquiorangel.com "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." Bill Gates -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHPh+0b6UiZnhJiLsRAuUWAJ91PNp5lST5nkZTB+CBYGKP77u9bQCgmqdq 0gxFihF5FWsBmBrrRkoY6hU= =N6N+ -----END PGP SIGNATURE-----