Ned Wolpert wrote: > Is there a way to set a timer with the stream.send_with_id method? If I send > it and the recipient has a problem so no result is returned, my client will > hang indefinitely. What's the best way to avoid that using the current > implementation?
I would do this in a thread, with an additional watcher-thread. Dirty,
non-tested code:
done = Mutex.new
requestthread = Thread.new { request...; done.unlock }
Thread.new { sleep 10; requestthread.kill; done.unlock }
done.lock
Maybe you find a better solution. Tell us about it!
Stephan.
pgpuLj1b2KuND.pgp
Description: PGP signature
