Yes. Acutally only one thread can enter the class.
Hmmm.

In my mind, a "class" is meant tor managing code and variables, while a thread is for managing execution contexts.

These two concepts don't have anything to do with each other: a class and an instance of same can be "associated with" or "executed by" several threads, a thread can execute several instances of a class.

E.g. Even the standard "TThread" defines a single thread (this is how it's code is implemented) , but the some functions and variables of same are/can be used by the thread, by another thread or by both.

Now you suggest that all procedures an instance of this kind of class are protected and thus thread-safe by definition.

This might be a really good thing, but needs some decent explanation as the bundling of code/variable administration and thread context administration is not a "natural" self-explaining concept.

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

Reply via email to