Home » U++ Library support » U++ MT-multithreading and servers » How to use CoWork and Progress together?
How to use CoWork and Progress together? [message #53511] |
Tue, 07 April 2020 14:58 |
Tom1
Messages: 1242 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
I've been trying to make CoWork and Progress work nicely together, but I just can't figure out what have I done wrong:
Progress pg;
pg.Title("A parallel processing job");
pg.SetText("Working on many items at once...");
pg.Set(0, 100);
Atomic done=0;
CoWork co;
co * [&] {
for(int i = co.Next(); i < 100 ; i = co.Next()) {
Sleep(100); // Doing something...
// OK, now it is done, update progress:
GuiLock _;
pg.SetPos(AtomicInc(done));
}
};
co.Finish();
Any suggestions how to make it work as it should? Now it just freezes at or near the end...
Best regards,
Tom
|
|
|
|
|
How to use CoWork and Progress together?
By: Tom1 on Tue, 07 April 2020 14:58
|
|
|
Re: How to use CoWork and Progress together?
By: Tom1 on Tue, 07 April 2020 16:39
|
|
|
Re: How to use CoWork and Progress together?
By: mirek on Thu, 09 April 2020 10:41
|
|
|
Re: How to use CoWork and Progress together?
By: mirek on Thu, 09 April 2020 13:13
|
|
|
Re: How to use CoWork and Progress together?
By: mirek on Thu, 09 April 2020 14:01
|
|
|
Re: How to use CoWork and Progress together?
By: Tom1 on Sat, 11 April 2020 11:14
|
|
|
Re: How to use CoWork and Progress together?
By: mirek on Sat, 11 April 2020 23:10
|
|
|
Re: How to use CoWork and Progress together?
By: Tom1 on Mon, 13 April 2020 09:52
|
|
|
Re: How to use CoWork and Progress together?
By: deep on Mon, 13 April 2020 12:41
|
|
|
Re: How to use CoWork and Progress together?
By: mirek on Mon, 13 April 2020 13:26
|
|
|
Re: How to use CoWork and Progress together?
By: deep on Mon, 13 April 2020 14:05
|
Goto Forum:
Current Time: Fri Sep 20 10:49:03 CEST 2024
Total time taken to generate the page: 0.02837 seconds
|