System.Classes.TThread.Suspend
Delphi
procedure Suspend; deprecated;
C++
void __fastcall Suspend _DEPRECATED_ATTRIBUTE0 ();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TThread |
Description
Attention: Suspend is deprecated.
Pauses a running thread. Suspend was intended to be used by debuggers and is deprecated in RAD Studio XE, in the year 2010.
Call Suspend to temporarily halt the execution of the thread. To resume execution after a call to Suspend, call Resume. Calls to Suspend can be nested; Resume must be called the same number of times Suspend was called before the thread resumes execution.
Warning: The Resume and Suspend methods should only be used for debugging purposes. Suspending a thread using Suspend can lead to deadlocks and undefined behavior within your application. Proper thread synchronization techniques should be based on TEvent and TMutex.