Closed GoogleCodeExporter closed 8 years ago
This is purely on the Delphi RTL side. Plus you should test such behavior
without using the debugger - starting and stopping threads in the debugger is
very slow.
Original comment by gabr42
on 15 Sep 2012 at 2:01
Well its pretty much the same debugger vs outside.
The more threads the more it takes to terminate it all..
By the way TerminateTime means time until controls are usable.
1 Thread (32 bits) TerminateTime = 3 seconds.
10 Threads (32 bits) TerminateTime = 30 seconds.
1 Thread (64 bits) TerminateTime = 19 seconds.
10 Threads (64 bits) TerminateTime = over 3 minutes..
Tasks are created like this..
// Initialize workers
Workers := CreateTaskGroup();
// Start workers for the lists
for I := 0 to Threads - 1 do
begin
CreateTask(TWorker.Create())
.WithLock(CreateOmniCriticalSection)
.MonitorWith(Monitor)
.Join(Workers)
.SetParameter('ThreadID',i)
.Invoke(@TWorker.Execute)
.Schedule(GlobalOmniThreadPool);
Workers.Tasks.Items[i].SetPriority(tpHighest);
end;
Original comment by david.lo...@gmail.com
on 15 Sep 2012 at 2:27
Oh well ill just rewrite it .NET
Not worth the extra time fooling around :)
Original comment by david.lo...@gmail.com
on 15 Sep 2012 at 4:05
Original issue reported on code.google.com by
david.lo...@gmail.com
on 15 Sep 2012 at 1:25