What I was originally trying to do was to avoid this message queue because it would have to be polled by the main thread every now and then, which is usually inefficient. But now it seems to me that there is no other way since it was pointed out to me that it is not possible to call a function and have it execute in the context of another thread.
If that would have been possible I would only have to call the function from the 'child thread' so to speak, execute it in the context of the 'parent thread', and voila - no further periodical checking of queues necessary.



cheers,

roel



Paul Grenyer wrote:

Hi



Ok thanks, this is exactly the answer I didn't want to hear ;) I was already fearing that I'd have to do something like that. I've been grepping MFC sources a bit and it looks that for the windows version of my program I'll have to write a message loop that can do idle processing (like in MFC) - basically the win32 message pump equivalent of the g_idle_add() function I mentioned in another reply in this thread. Ah well, I'll have to live with it, I guess. Thanks everybody for your replies.


This gave me a thought. Are you wanting to create some sort of message queue that is monitored by a number of threads that wait for a message to tell them what to do?

Regards
Paul

Paul Grenyer
Email: [EMAIL PROTECTED]
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now available for download.



_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.





Reply via email to