class procedure StaticSynchronize(const AThread: TThread; AMethod: TThreadMethod); static; deprecated 'From C++ just use Synchronize now that it is just a static method';
static void __fastcall StaticSynchronize _DEPRECATED_ATTRIBUTE1("From C++ just use Synchronize now that it is just a static method") (TThread* const AThread, TThreadMethod AMethod);
Executes a method call within the main thread.
StaticSynchronize causes the call specified by AMethod to be executed using the main thread, thereby avoiding multi-thread conflicts. The current thread is passed in the AThread parameter.
If you are unsure whether a method call is thread-safe, call it from within the StaticSynchronize method to ensure that it executes in the main thread.
Execution of the current thread is suspended while Method executes in the main thread.
Warning: Do not call StaticSynchronize from within the main thread. This can cause an infinite loop.
Note: You can also protect unsafe methods using critical sections or the multi-read exclusive-write synchronizer.