Yes, it is correct that it allows the main thread to communicate with the child threads via the Window Message Queue (though I am workin on a way to make it last beyond the Window's lifespan).

And techinically... no, sending data that way wont work quite yet...
 but that is the general idea in the end.

Sounds interesting.

I plan on moving things to a ThreadsSafe::SendMessage() form in order to allow lifespan of the children beyond that of the window message queue, as well as provide and *easy* way of transfering the data to that queue.


There is an issue with using the windows queue that you need to be aware off (you probably know this anyway, but I'm mentioning it just in case). On all versions of windows the queue can't grow beyond a fixed certain size, and in versions below XP, the windows queue is relatively small (in xp, the max queue size is 10,000). If the queue is full, messages just "disappear".

the format for sending message then would be more along ths lines of:

ThreadsSafe::SendMessage(MESSAGE, WPARAM, LPARAM[, DATA]);

the reference is a scalar/list/hash/storable object, that will be frozen by storable and then put on the destination threads's queue, where it will be sent over to the callback for that threads, in its original form via thaw.


This will work well, I do something similar in another project.

Cheers,

jez.



Reply via email to