[Lazarus] Threads

Sven Barth pascaldragon at googlemail.com
Fri Mar 23 12:18:37 CET 2012


Am 23.03.2012 12:02, schrieb Michael Schnell:
> Your concept of threads does not really hold.
>
> Regarding the thread object (TThread descendant) instance itself:
>
> It's creator is called by some thread (usually the project's main
> thread) but of course not by the thread that is going to be created.
>
> Some of it's properties and functions are _supposed_ to be used by the
> thread it owns (e.g. "Terminated")
>
> Some of it's properties and functions are _supposed_ to be used by other
> threads (e.g. "Terminate")
>
> It depends on the user code what self-created additional functions and
> properties are to be used by whom and if they can be considered to be
> thread save.
>
> Same holds for stuff created outside of the thread unit, but supposed to
> be used by the thread ("Execute" procedure).
>
> (There is no simplified concept.)

You know that he wrote the following, stressing the part in the parenthesis:

> Assuming this few statements (aka my own rules when writing thread's code):

Thus he is fully aware that this is not a general concept, but only his 
own, "enforced" by himself.

Regards,
Sven




More information about the Lazarus mailing list