Ignore:
Timestamp:
Sep 6, 2012, 8:29:27 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Balíček ModularSystem namísto vlastní implementace.
  • Upraveno: Aktualizace balíčku Common.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UResetableThread.pas

    r84 r89  
    5454    procedure MethodFinish(Sender: TObject);
    5555  protected
    56     procedure ThreadException(Sender: TObject; E: Exception);
    5756    function NewItemObject: TObject; override;
    5857  public
    5958    LastExceptionClass: TClass;
    6059    LastExceptionMessage: string;
     60    procedure ThreadException(Sender: TObject; E: Exception);
    6161    procedure CheckException;
    6262    procedure WaitForEmpty;
     
    273273procedure TThreadPool.RunInThread(AMethod: TMethodCall);
    274274begin
    275   CheckException;
    276   with TResetableThread(Acquire) do begin
    277     Method := AMethod;
    278     OnFinished := MethodFinish;
    279     Start;
     275  try
     276    with TResetableThread(Acquire) do begin
     277      Method := AMethod;
     278      OnFinished := MethodFinish;
     279      Start;
     280    end;
     281  finally
     282    CheckException;
    280283  end;
    281284end;
Note: See TracChangeset for help on using the changeset viewer.