TIdSync
still works, but is deprecated because TThread::Synchronize()
with an anonymous procedure accomplishes the same thing that TIdSync
was originally intended for. Read Embarcadero's documentation for How to Handle Delphi Anonymous Methods in C++.