[DUG] graphics stops updating
Matt Comb
matt at ferndigital.com
Mon Jun 20 18:39:21 NZST 2005
No thats the same deal. If your main thread reads that property at the same
time its written then it'll blow.
You can safeguard this with critical sections in the same was as my previous
example.
As Trevor said, encasing one integer value with a critical section is
overkill, my example was meant only to show you how you could setup an
object (or thread) and assign values.
Matt.
----- Original Message -----
From: "Ross Levis" <ross at stationplaylist.com>
To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Sent: Monday, June 20, 2005 5:01 PM
Subject: Re: [DUG] graphics stops updating
> Thanks everyone for the multi-threading techniques.
>
> What about a Property to access the threaded variable. I've turned my
> unit into a component which runs inside the thread, and added a property
> in this component to access the local integer. eg.
> property volLeft : Integer read FLeft;
>
> Would it be threadsafe to read the property?
>
> Cheers,
> Ross.
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
More information about the Delphi
mailing list