TThread.resume is deprecated in Delphi-2010 what should be used in place?

Charles if do you read the code of TThread class , do you find the answer.

   TThread = class  
   private type  

..
..
..   
   public  
     constructor Create(CreateSuspended: Boolean);  
     destructor Destroy; override;  
     procedure AfterConstruction; override;  
     // This function is not intended to be used for thread synchronization.  
     procedure Resume; deprecated;  
     // Use Start after creating a suspended thread.  
     procedure Start;  
     // This function is not intended to be used for thread synchronization.  
     procedure Suspend; deprecated;  
     procedure Terminate;  

See this link RAD Studio 2010: Community pulse: The day after. (Part 2)

Edit:

If you need to synchronize threads, you can use a scheme based on TMutex, TEvent and critical sections.

Bye.

Leave a Comment