Detect any attempt to use non-blocking socket from worker threads
This doesn't work, as non-blocking sockets implementation requires dispatching events generated by them, which is only possible from the main thread event loop, and it's better to be upfront about it rather than failing mysteriously later.
This commit is contained in:
@@ -289,6 +289,12 @@ public:
|
||||
/**
|
||||
Constructor.
|
||||
|
||||
Notice that if the object is created from a worker thread or if it is
|
||||
created from the main thread but the event loop is not running, @a
|
||||
flags parameter @em must include ::wxSOCKET_BLOCK as non-blocking
|
||||
sockets require dispatching events, which can only be done in the main
|
||||
thread.
|
||||
|
||||
@param flags
|
||||
Socket flags (See wxSocketBase::SetFlags())
|
||||
*/
|
||||
|
Reference in New Issue
Block a user