On 03 May 2013, at 11:30, Zaher Dirkey wrote:

> 
> On Fri, May 3, 2013 at 12:18 PM, Ewald <ew...@yellowcouch.org> wrote:
> That's true, but at least it returns control to you (= the programmer), so 
> you can close the handles manually.
> 
> ​I am notprefer force to close any thing, that will make more bugs in your 
> application​, while it is work fine with other programmesr without using 
> cancel it.

Neither do I, but wasn't that what Silvio asked? [by saying: `The problem now 
is how to stop the "Accept" but without errors`]

I admit, killing an entire thread is a bit overkill for just getting back 
control from accept, but I also recall that he wanted to close the application 
[or am I seeing ghosts?]. But if you don't want to use pthread_cancel(), use 
non-blocking sockets -- In my experience though, it isn't worth the code if you 
just want to kill the application gracefully.

Anyway, I'm sure there are other ways to get this done (signals?), but these 
are two methods I know about. Each has it's bonuses and pitfalls.

--
Ewald

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to