Ignore:
Timestamp:
Jan 26, 2011, 7:58:27 PM (14 years ago)
Author:
george
Message:
  • Fixed: Micro threads freeing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • MicroThreading/Demo/UMainForm.pas

    r149 r150  
    1414
    1515  TMainForm = class(TForm)
     16    Button1: TButton;
    1617    Button2: TButton;
    1718    ButtonAddWorkers: TButton;
     
    2425    Label1: TLabel;
    2526    Label10: TLabel;
     27    Label11: TLabel;
    2628    Label2: TLabel;
    2729    Label3: TLabel;
     
    4244    TimerRedraw: TTimer;
    4345    TimerSchedulerStart: TTimer;
     46    procedure Button1Click(Sender: TObject);
    4447    procedure ButtonSchedulerStartStopClick(Sender: TObject);
    4548    procedure Button2Click(Sender: TObject);
     
    8790  if ButtonSchedulerStartStop.Caption = 'Start scheduler' then begin
    8891    ButtonSchedulerStartStop.Caption := 'Stop scheduler';
    89     Memo1.Clear;
     92    Scheduler.ThreadPoolSize := SpinEdit2.Value;
    9093    Scheduler.Active := True;
    9194  end else begin
     
    9396    Scheduler.Active := False;
    9497  end;
     98end;
     99
     100procedure TMainForm.Button1Click(Sender: TObject);
     101begin
     102  Memo1.Clear;
    95103end;
    96104
     
    191199procedure TMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    192200begin
     201  Scheduler.Active := False;
    193202end;
    194203
Note: See TracChangeset for help on using the changeset viewer.