Commit 74a27ca0 authored by Colomban Wendling's avatar Colomban Wendling

LibOVCCClient: add a FIXME about a race condition we should fix someday

parent 5586a8b9
...@@ -18,6 +18,23 @@ ...@@ -18,6 +18,23 @@
* *
*/ */
/*
* FIXME: there is a race condition when disconnecting if there are message
* pending:
*
* either the send thread might exit before the async result callback of
* send_message() returned, thus leading to the connection to be closed at this
* time, thus triggering and assertion failure;
* (BTW: why is this a real problem? it should not prevent a message to be
* sent, in the worst case it should only make the code running after that to
* abort... not sure what's going on :/)
*
* or we keep the thread alive until that callback returned, but since it runs
* in the main thread, if we disconnect meanwhile from the main thread we'll
* enter a deadlock since we'll wait for the thread to terminate, while the
* thread waits from a main thread callback to terminate.
*/
using OVCC; using OVCC;
using OVCC.Network; using OVCC.Network;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment