title: Is it dangerous to use synchronize in a non-VCL application?
body: <p>If Delphi code was written with synchronize to serialize access to the main VCL thread, but this code then is used in a non-VCL application, will it synchronize with the main thread of the application or just have no effect at all?</p>
  
  <hr>
  
  <p>Example:</p>
  
  <pre><code>procedure TMyThread.Execute;
  begin
  
    // ... other code
  
    Synchronize(SomeMethod);
  
    // ...
  
  end;
  </code></pre>
  
  <p>Let's assume </p>
  
  <ul>
  <li>it is a non-VCL application which has a main thread which executes in an endless loop (or until terminated)</li>
  <li>the main thread does not call <a href="http://docwiki.embarcadero.com/Libraries/en/System.Classes.CheckSynchronize" rel="noreferrer"><code>CheckSynchronize</code></a> directly or in a WakeMainThread handler</li>
  <li>a secondary thread runs and executes Synchronize(SomeMethod) like in the example above</li>
  </ul>
  
  <p>Will the thread hang on the Synchronize(SomeMethod) line?</p>