Problems with wxThread::Wait in a dll under windows

Tim Kosse tim.kosse at gmx.de
Sun Dec 10 01:48:04 PST 2006


Marco Gubernati wrote:
> the wxThread::Wait() executes the following peace of code
> 
>     do
>     {    [...]
> 
>         result = ::MsgWaitForMultipleObjects
>                  (
>                    1,              // number of objects to wait for
>                    &m_hThread,     // the objects
>                    false,          // don't wait for all objects
>                    INFINITE,       // no timeout
>                    QS_ALLINPUT|QS_ALLPOSTMESSAGE   // return as soon as
> there are any events
>                  );
> 
I encountered the same problem, though in a GUI application. From a
function called Wait, I expected true waiting semantics, while
wxThread::Wait can do other stuff like processing the message loop.

I've written a simple class which simulates joinable threads using
detached threads and wxCondition. See
http://filezilla-project.org/codesquid/threadex.tar.bz2


Tim





More information about the wx-users mailing list