Centralized 'thread active' handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Klaus Schmidinger wrote:

>> it would somewhat reduce my confusion when switching from the elegance 
>> of delphi/lazarus to the awkwardness of C++ ;-)
> 
> 
> Why use an extra negation here?
> I think a positive check ('Active()') is more straightforward
> than a negative one ('!Terminated()').

It mostly depends on habit. The native delphi class for threads (and the 
corresponding one in freepascal), TThread, just uses Terminate instead 
of Cancel, and the corresponding property is Terminated, so I'm just 
used to wrap a thread in a "while not terminated".

> Just wondering: what does this have to do with "elegance" vs. 
> "awkwardness"?

Nothing, it was a tongue-in-cheek remark.

Bye
-- 
- Yo tambi?n quiero una Europa libre de Patentes de Software  -
- I want a Software Patents Free Europe too! And you?         -
---------------------------------------------------------------
   EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20050813/4f237f40/signature.pgp

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux