I currently spawn a thread for reading data but on the other thread I send data. So when the reading thread blocks I can't send data on the other thread.
-Sean Chapel
On Tue, Dec 28, 2010 at 5:26 PM, Frederick LeMaster fred.lemaster@gmail.com wrote:
You can use gambit's threads to have one thread block on port I/O and allow another thread to check a condition variable to see if there is available data.
2010/12/28 sean chapel seoushi@gmail.com:
P!,
Thanks. I did see that function but it's not quite what I was looking for but it should work. I would have to set the timeout to 0 so it returns instantly. Something like c's poll function would be a better fit.
-Sean Chapel
2010/12/28 Adrien "Pied" Piérard axioplase@gmail.com:
Hi.
I tried using "peek-char" but it seems it's blocking. What should I use in this situation?
I'm pretty sure you're looking for INPUT-PORT-TIMEOUT-SET! http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php?title=Documentation:Pr...
Cheers,
P!
Français, English, 日本語, 한국어
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list