[PLUG] high cpu utilization

Manas Alekar maalekar at gmail.com
Tue Nov 10 05:11:58 IST 2009


>
> push data from one thread to another  push a buffer in a g_queue which get
> pulled in the thd_w and used. But since thd_r is much slower then thd_w,  I
> have to wait in thd_w again and again in a while loop polling for the data
> to be pushed queue from thd_r.


Use select() on the queue. There are some caveats, nothing unsurmountable.



More information about the Plug-mail mailing list