[ENet-discuss] wake-up enet service

Jack Applegame japplegame at gmail.com
Thu Aug 2 11:57:22 PDT 2012


I check ENet sources and found that it uses blocking(synchronous) socket 
operations. This means there is no way to wake-up waiting thread without 
serious modification of sources. :(

02.08.2012 12:13, Ruud van Gaal wrote:
> I'd always use timeout=0, except for really simple apps perhaps.
> As for waking up threads then, it's just standard OS things (not 
> related to ENet); check out semaphores and waitable objects.
>
> Cheers,
> Ruud
>
> On Thu, Aug 2, 2012 at 8:58 AM, Jack Applegame <japplegame at gmail.com 
> <mailto:japplegame at gmail.com>> wrote:
>
>     Hello!
>
>     I use separate thread for calling enet_host_service() with 1
>     second timeout.
>     Is there a way to wake-up ENet from other thread, if It is
>     necessary to send a packet immediately without waiting for timeout?
>     Setting timeout to zero isn't good way, because in this case
>     service thread fully loads one processor core even if it is no
>     network activity.
>
>     Best regards
>     Jack Applegame
>     _______________________________________________
>     ENet-discuss mailing list
>     ENet-discuss at cubik.org <mailto:ENet-discuss at cubik.org>
>     http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
>
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20120802/21580657/attachment.html>


More information about the ENet-discuss mailing list