revalNG / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

XE2 64 Bit TerminateAll(); #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you terminate all tasks in a taskgroup with 64 bits it takes 4x times to 
terminate all than if you use 32 bits.

This tells me that support for 64 bits is STILL not done yet.. 

Original issue reported on code.google.com by david.lo...@gmail.com on 15 Sep 2012 at 1:25

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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