> > 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.