quickNitin
5th November 2006, 08:24
This is related to Linux ,fifo and pthreads.
How i can come to know that data at receiving end of fifo has arrived. Is there any way to know this asynchronously other than blocked reading or continuous polling.
situation is such ( presenting in abstract manner): In main thread, an other member-thread is run( Qthread). In this member-thread , i open a fifo for non bloced reading. This fifo will receve values from some other process. And i want to pass these values to main thread.
2 issues are here:
1. How i will come to know some-data is available in fifo. Currently i am going for periodic reading?
2. How to inform this to main thread. Currently whenever i receives something, i send a signal connected to slot of main thread. This makes thread behaves as some function and control passes immediately to main thread-slot. and control do not come back. Ihave started a timer which will keep starting this member-thread.
here i know ,a lot of things are fishy. I am looking for guidance how to make that well.
quickNitin
How i can come to know that data at receiving end of fifo has arrived. Is there any way to know this asynchronously other than blocked reading or continuous polling.
situation is such ( presenting in abstract manner): In main thread, an other member-thread is run( Qthread). In this member-thread , i open a fifo for non bloced reading. This fifo will receve values from some other process. And i want to pass these values to main thread.
2 issues are here:
1. How i will come to know some-data is available in fifo. Currently i am going for periodic reading?
2. How to inform this to main thread. Currently whenever i receives something, i send a signal connected to slot of main thread. This makes thread behaves as some function and control passes immediately to main thread-slot. and control do not come back. Ihave started a timer which will keep starting this member-thread.
here i know ,a lot of things are fishy. I am looking for guidance how to make that well.
quickNitin