From: Asterix Gallier Date: 2006-08-07T17:36:39+09:00 Subject: Re: Signaling Ruby from C/C++ Francis Cianfrocca wrote: > Does this actually work??? Windows doesn't have signals, so maybe > you've gotten lucky with whatever mechanism Ruby uses to simulate > signals on Windows. I would doubt this solution works reliably on Unix > or Linux, because a signal is delivered to the whole process, and in > general you can't predict which thread will handle it. (Unless there's > something magic about rb_f_kill that I don't know about.) > > Have you tried sending data to a file descriptor in the native thread, > and selecting the descriptor for readable in the Ruby thread? I know > this works, and there have been several threads about this approach on > this board in the last few months. Hello Francis, the solution above works somehow, but i experienced that this is not very reliable. Your solution by using a file descriptor sounds very interesting. I've searched but didn't find any adequate example or documentation beside the ruby source itself. Can you please give me any support for this approach. As far as i can see, i need to simulate a file filedescriptor to ruby. Am I right? I've got no idea how to do this. I take a look at the ruby-serialport source but i think that this is not applicable to my situation or? With Regards Asterix -- Posted via http://www.ruby-forum.com/.