I'd always use timeout=0, except for really simple apps perhaps.<div>As for waking up threads then, it's just standard OS things (not related to ENet); check out semaphores and waitable objects.</div><div><br></div>
<div>Cheers,</div><div>Ruud<br><br><div class="gmail_quote">On Thu, Aug 2, 2012 at 8:58 AM, Jack Applegame <span dir="ltr"><<a href="mailto:japplegame@gmail.com" target="_blank">japplegame@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I use separate thread for calling enet_host_service() with 1 second timeout.<br>
Is there a way to wake-up ENet from other thread, if It is necessary to send a packet immediately without waiting for timeout?<br>
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.<br>
<br>
Best regards<span class="HOEnZb"><font color="#888888"><br>
Jack Applegame<br>
______________________________<u></u>_________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/<u></u>mailman/listinfo/enet-discuss</a><br>
</font></span></blockquote></div><br></div>