diff options
Diffstat (limited to 'src/macosx0/Wrapper/PseudoThread.pas')
-rw-r--r-- | src/macosx0/Wrapper/PseudoThread.pas | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/macosx0/Wrapper/PseudoThread.pas b/src/macosx0/Wrapper/PseudoThread.pas new file mode 100644 index 00000000..16157646 --- /dev/null +++ b/src/macosx0/Wrapper/PseudoThread.pas @@ -0,0 +1,48 @@ +unit PseudoThread; + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + +interface + +type + +// Debugging threads with XCode doesn't seem to work. +// We use PseudoThread in Debug mode to get proper debugging. +TPseudoThread = class(TObject) + private + protected + Terminated, + FreeOnTerminate : Boolean; + procedure Execute; virtual; abstract; + procedure Resume; + procedure Suspend; + public + constructor Create(const suspended : Boolean); +end; + +implementation + +{ TPseudoThread } + +constructor TPseudoThread.Create(const suspended : Boolean); +begin + if not suspended then begin + Execute; + end; +end; + +procedure TPseudoThread.Resume; +begin + Execute; +end; + +procedure TPseudoThread.Suspend; +begin +end; + +end. + |