Why methods Resume() and Suspend() from TThread are marked as deprecated? Suspended thread is not allowed (not recommended)?

Comments

  1. David Heffernan what is the point on having 7 year old deprecated code? I can understand that if you mark some routine as deprecated you still keep it around a few releases to "not break code". Wait, that code is already broken.

    Maybe it's time to clean up

    ReplyDelete
  2. David Millington thx for explanation :-)

    ReplyDelete
  3. Older references of "Resume" was only to be used for threads created in suspended state and you called Resume to start the thread for the very first time. An easy way to explain why you should never call Suspend in your code: Say you have an open connection to a FTP server and you Suspend your thread....Q: what happens to that connection? A: Nothing good. David's suggestion for event handling is the way to go for 'suspending' an action you have in process.

    ReplyDelete

Post a Comment