Home » U++ Library support » U++ MT-multithreading and servers » AsyncWork, IsFinished() may not be working properly
Re: AsyncWork, IsFinished() may not be working properly [message #54434 is a reply to message #54433] |
Sat, 18 July 2020 17:06 |
JeyCi
Messages: 50 Registered: July 2020
|
Member |
|
|
JeyCi wrote on Sat, 18 July 2020 16:44 while(!workers.IsEmpty())
for(int i = 0; i < workers.GetCount(); i++) {
? is it duplication of loop & what for? why not use only one any row from these 2, not both?
sorry to hurry with my question - I understood -
1 cycle "for" from the beginning till the end of the container;
second cycle (while) - to repeat again & again for-cycle from the beginning till the end of the container - until container IsEmpty... because after first for-loop some worker-threads can be still not finished... really logically
JeyCi wrote on Sat, 18 July 2020 16:44
- it always seems to me that counter itself is always shared & should be locked somehow when making i++...
but frankly speaking, if you insist that not, I can agree with you now... because this i (counter) is still in one (primary) thread, from where it is taken to workers - Geniusly... thanks a lot
===
after your example - more clear is now my view at threads...
Best regards.
[Updated on: Sat, 18 July 2020 17:25] Report message to a moderator
|
|
|
|
|
AsyncWork, IsFinished() may not be working properly
By: Oblivion on Wed, 28 March 2018 19:17
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: mirek on Sat, 31 March 2018 07:49
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: Oblivion on Sat, 31 March 2018 12:51
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Fri, 17 July 2020 12:48
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 07:51
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 14:21
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 16:44
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 17:06
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 18:34
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
|
|
|
Re: AsyncWork, IsFinished() may not be working properly
By: JeyCi on Sat, 18 July 2020 21:02
|
Goto Forum:
Current Time: Sun Apr 28 01:16:45 CEST 2024
Total time taken to generate the page: 0.07915 seconds
|