Download Now

    Reference TSimpleThread

    Declared in Codebot.System.pas on line 1246

    TSimpleThread allows objects to create a threading method without defining a new thread class
      TSimpleThread = class(TThread)
      protected
        { Sets FreeOnTerminate to True and executes the method }
        procedure Execute; override;
      public
        { Create immediately starts ExecuteMethod on a new thread }
        constructor Create(ExecuteMethod: TThreadExecuteMethod; OnStatus: TNotifyEvent = nil; OnTerminate: TNotifyEvent = nil);
        { Synchronize can be used by ExecuteMethod to invoke a method on the main
          thread }
        procedure Synchronize(Method: TThreadMethod);
        { You should only set status inside ExecuteMethod }
        property Status: string read FStatus write SetStatus;
        { Terminated is set to True after the Terminate method is called }
        property Terminated;
      end;

    See also