Changeset 143 for MicroThreading/UMicroThreading.pas
- Timestamp:
- Jan 24, 2011, 4:15:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MicroThreading/UMicroThreading.pas
r142 r143 72 72 TMicroThreadMethod = class(TMicroThread) 73 73 Method: TMicroThreadEvent; 74 procedure Execute; override; 75 end; 76 77 { TMicroThreadSchedulerPoolThread } 78 79 TMicroThreadSchedulerPoolThread = class(TThread) 80 Scheduler: TMicroThreadScheduler; 74 81 procedure Execute; override; 75 82 end; … … 125 132 implementation 126 133 134 { TMicroThreadSchedulerPoolThread } 135 136 procedure TMicroThreadSchedulerPoolThread.Execute; 137 var 138 ExecutedCount: Integer; 139 begin 140 inherited Execute; 141 try 142 repeat 143 ExecutedCount := Scheduler.Execute(10); 144 if ExecutedCount = 0 then Sleep(1); 145 until Terminated; 146 except 147 on E: Exception do 148 //ExceptionHandler(E); 149 end; 150 end; 151 127 152 { TMicroThreadMethod } 128 153
Note:
See TracChangeset
for help on using the changeset viewer.