Ok, thank you very much, I will try to use 1000ms.

2017-05-23 10:12 GMT+03:00 Lukas Gebauer <gebyl...@mlp.cz>:

> > > >   s := FServerSock.RecvPacket(10);
>
> > > BTW: this function is not designed for too small timeout.
>
> > What should be the timeout value and if it is comparable with the one
> > second, then how to use TUDPBlockSocket to make the thread quick respond
> to
> > other operations, for example termination?
>
> What is multitasking time slice on your system? It is usually higher
> then 10ms. So, on little bit busy systems it not assure fast thread
> response. And it eating CPU for each cycle.
>
> Why you need a fast response to thread termination? When you need to
> terminate thread by a command?
> On application end, and when user want to kill the thread by some
> reason. Both can have react times like 500ms without any negative
> consequences. Even you need to have very fast responses for some
> reasons, you can use 100ms for example. It test thread termination 10
> times per second. It is not enough?
>
> These times are valid for situations without any data was received.
> When some UDP is delivered, then thread wake up immediately.
>
> BTW: on some my TCP/UDP servers without GUI (it is system services) I
> am using timeout 1000-2000ms. No problem.
>
>
> --
> Lukas Gebauer.
>
> http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
> http://geoget.ararat.cz/ - Geocaching solution
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to