Cygwin: fhandler_fifo::take_ownership: don't set event unnecessarily
Don't set update_needed_evt if there's currently no owner. This will cause unnecessary churn once I'm the owner and am listening for connections.
This commit is contained in:
parent
4f25d82cb1
commit
a4dc0eb15c
@ -1186,7 +1186,10 @@ fhandler_fifo::take_ownership ()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
set_pending_owner (me);
|
set_pending_owner (me);
|
||||||
|
/* Wake up my fifo_reader_thread. */
|
||||||
owner_needed ();
|
owner_needed ();
|
||||||
|
if (get_owner ())
|
||||||
|
/* Wake up owner's fifo_reader_thread. */
|
||||||
SetEvent (update_needed_evt);
|
SetEvent (update_needed_evt);
|
||||||
owner_unlock ();
|
owner_unlock ();
|
||||||
/* The reader threads should now do the transfer. */
|
/* The reader threads should now do the transfer. */
|
||||||
|
Loading…
Reference in New Issue
Block a user