Show: Delphi C++
Display Preferences

System.Classes.TThread.Suspend

From XE2 API Documentation
Jump to: navigation, search

Delphi

procedure Suspend; deprecated;

C++

void __fastcall Suspend _DEPRECATED_ATTRIBUTE0 (void);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TThread

Description

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.


See Also

Personal tools
Previous Versions
Translations