<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Am Fr., 14. Dez. 2018, 11:26 hat Luca Olivetti <<a href="mailto:luca@ventoso.org">luca@ventoso.org</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El 13/12/18 a les 20:36, Martin Frb ha escrit:<br>
<br>
> The thread may makes calls (several, one after the other) into a <br>
> library, and each of those calls may not return for some time (to long <br>
> for the main thread to wait, without the app becoming unresponsive). And <br>
> the structure of that library may not be possible to change.<br>
> <br>
<br>
I think that TThread should have a method to kill it for such cases, <br>
using, e.g., pthread_cancel under unix or TerminateThread under windows <br>
(though the latter is not a very good option according to the <br>
documentation).<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">These functions have the potential to leave locks in a locked state which would lead to deadlocks. Thus ccoperative exits are always preferable. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"></div></div></div>