[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Helper Threads Toolkit
- From: Javier Guerra <javier@...>
- Date: Mon, 13 Mar 2006 00:53:25 -0500
On Friday 10 March 2006 9:20 pm, Vijay Aswadhati wrote:
> I have C++ tasks (that I wish I could make them invocable from Lua)
> that can be canceled or it's state updated from one or more tasks.
i have renamed the helper.finish(task) function to helper.update(task) and
added the C function signal_task(). the idea is that it's now useful as a
general communication between Lua code and a working thread.
from the worker thread, when you want to send something to Lua, you call
signal_task(), passing a boolean true if you want the thread to be paused.
this causes the task to appear in the output queue. the Lua code then should
call update(task, ...) to get any intermediate data, or even to send some
data to the thread. thread will be automatically unpaused, if appropriate.
please check it in CVS.
--
Javier
Attachment:
pgpX45uUBsNXm.pgp
Description: PGP signature