[PLUG] high cpu utilization

Vivek Khurana hiddenharmony at gmail.com
Sun Nov 8 19:42:00 PST 2009


On Sun, Nov 8, 2009 at 10:18 PM, Kapil Agrawal <kapil.agl at gmail.com> wrote:
> But its a not so good hack, nor a right fix. Right thing would be that I put
> my thd_w in sleep till there is no data in the queue and once thd_r pushes
> some data in queue the thd_w should wake up to consume. But I am not sure
> how can I achieve this ?

 Look at message passing.., I would run these two as separate
processes and not separate threads. One process reads from video
hardware and pushes data in a queue, another process consumes from the
queue.

regards
Vivek

-- 
The hidden harmony is better than the obvious!!



More information about the plug-mail mailing list