On 09/19/2014 02:48 PM, Xiangrong Fang wrote:


As far as I tried, you cannot use RTLEventWaitFor in main thread, otherwise the gui will freeze.

Of course I did not do this. I used TEvent.Waitfor and I only used it in the Execute function of the worker Threads .

Supposedly the problem was that the Worker Threads I created already ran in a loop while the GUI constructed the Form and for an unknown reason the GUI Thread did not get enough time slices to ever get done with it's work.

Anyway, after correctly managing the worker Threads everything is fine.

I can post this version of the TThreadPool class here, if you might want to try it. I'd be very interested in knowing if the project works correctly on your (64 bit) systems.

-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to