Home » Community » Newbie corner » TIme and Idle
Re: TIme and Idle [message #31419 is a reply to message #31410] |
Tue, 01 March 2011 13:18  |
|
Wlad wrote on Tue, 01 March 2011 11:15 | I'll try to explain the roots of the problem.
They are stemmed from VERY large old application developed by an other guy.
It was developed at early 90s and DID NOT use multithreading.
You know... MANY tasks processed in loop, every new sequence of which was initiated by receiving ON_IDLE mrssage...
Now I transform it into U++ «one-to-one» (using analogies).
While it works as «direct copy», I will try to rewrite it using multithreading approach.
|
OK, I understand Simple solution could probably be to use Cowork. Instead of waiting for "OnIdle", you would just post a callback to Cowork which should take care about the threading and scheduling at the same time. It maintains fixed size thread pool, so if you post more jobs than you have available threads, it will be queued and start when something else finishes, which is essentialy the same as idle state. Note that I never did something like this, so take it just as a guess You'll find out if it works only if you try it 
Honza
[Updated on: Tue, 01 March 2011 13:18] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Aug 24 11:25:59 CEST 2025
Total time taken to generate the page: 0.05983 seconds
|