Let's say TForm1
class (default main window) contains data member int x;
. If I create additional threads from TThread
descendant should I use critical section object or Synchronize/Queue methods to modify value of x
inside thread's Execute method?
I know that Synchronize/Queue are used when thread makes changes to VCL components. But, does that also applies here just because x
is declared inside VCL's TForm1
or I can simply use critical section object instead?