Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdSync vs TThread.Synchronize
#1
Hi, just wondering: does TIdSync nowadays still work in the latest Indy version?  I see a warning saying it is deprecated and suggest to change to use TTThread.Synchronize, however in and old "indy indepth" doc, it introduces TIdSync as following

TIdSync
TThread has a Synchronize method, but it does not support the ability to pass parameters to
synchronized methods. TIdSync allows for synchronizations with the ability to pass parameters to the
synchronized methods as well. TIdSync also allows for return values to be returned from the main
thread.


I use TIdsync a lot with passed in paramteres and return value (mainly to read property value of a UI component on the main form).
Now, if I switch to use TTThread.Synchronize, is it really as easy as using TIdsync to allow pass parmater to and get return value? 
And if I keep the code as is (using TIdsync), what would be a potential risk of this in future considering it is now "deprecated"? 

Thank you very much.
Reply


Messages In This Thread
TIdSync vs TThread.Synchronize - by happyzj - 02-19-2021, 08:08 AM
RE: TIdSync vs TThread.Synchronize - by rlebeau - 02-19-2021, 04:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)