[PLUG] high cpu utilization

Manas Alekar maalekar at gmail.com
Mon Nov 9 15:41:58 PST 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