My guess is that serialport library has no way of knowing if it has any
data incoming [it has to poll until data arrives?]
If that's the case, then you might could use fork plus some of the
excellent fork libraries available http://allgems.ruby-forum.com/gems?search=fork or you'd need to "fix"
serialport so that it's 1.9 compatible, and then wrap its read call in
an rb_thread_blocking_region, so that it allows other threads to
operate.
GL.
-r
My guess is that serialport library has no way of knowing if it has any
data incoming [it has to poll until data arrives?]
If that's the case, then you might could use fork plus some of the
excellent fork libraries available http://allgems.ruby-forum.com/gems?search=fork or you'd need to "fix"
serialport so that it's 1.9 compatible, and then wrap its read call in
an rb_thread_blocking_region, so that it allows other threads to
operate.
GL.
-r
No I am using frok only . It is working fine no problem .
Also while traping simultaneous SIGCLD also it does not working properly
.
Please fix it and makes rubyserial compactable with thread and Traping
signal .
> My guess is that serialport library has no way of knowing if it has any
> data incoming [it has to poll until data arrives?]
> If that's the case, then you might could use fork plus some of the
> excellent fork libraries available
>http://allgems.ruby-forum.com/gems?search=forkor you'd need to "fix"
> serialport so that it's 1.9 compatible, and then wrap its read call in
> an rb_thread_blocking_region, so that it allows other threads to
> operate.
> GL.
> -r
No I am using frok only . It is working fine no problem .
Also while traping simultaneous SIGCLD also it does not working properly
> serialport so that it's 1.9 compatible, and then wrap its read call in
> an rb_thread_blocking_region, so that it allows other threads to
> operate.
> GL.
> -r
No I am using frok only . It is working fine no problem .
Also while traping simultaneous SIGCLD also it does not working properly
You are passing in the same object to different threads. So the
threads call methods on the same object.
Try creating a SerialPort.new inside the thread.
With fork, you generate a seperate ruby process with seperate objects.
I have to inform you another problem . Al though I am using Thread for
one serial
port let us say /dev/ttyPS0 .
It is blocking another serial devive /dev/ttyPS2 . I could not
understand why thread is blocking another serial device too while using
serialport library .
Please go through the attached source code . For your reference .
I have to inform you another problem . Al though I am using Thread for
one serial
port let us say /dev/ttyPS0 .
It is blocking another serial devive /dev/ttyPS2 . I could not
understand why thread is blocking another serial device too while using
serialport library .
Are they both being read from within the same process, in different threads?
-r
I have to inform you another problem . Al though I am using Thread for
one serial
port let us say /dev/ttyPS0 .
It is blocking another serial devive /dev/ttyPS2 . I could not
understand why thread is blocking another serial device too while using
serialport library .
Are they both being read from within the same process, in different
threads?
-r
yes , of course .
Please have look on attached modemThread.rb file .
I have to inform you another problem . Al though I am using Thread for
one serial
port let us say /dev/ttyPS0 .
It is blocking another serial devive /dev/ttyPS2 . I could not
understand why thread is blocking another serial device too while using
serialport library .
Are they both being read from within the same process, in different
threads?
-r
yes , of course .
Please have look on attached modemThread.rb file .
One port is in same process another one in therad .
please go through the attached modemThread.rb in previous .