Home » U++ Library support » U++ MT-multithreading and servers » what about WorkQueue : public CoWork
first, CoWork.h and CoWork.cpp cleanups [message #24892 is a reply to message #24889] |
Wed, 03 February 2010 12:07   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
during study of CoWork class stuff, i stumbeled oacross some small grains..which is but of beaty reasons 
1) static Pool::ThreadRun and static Pool::DoJob
why should they be static, the Pool itself is generatet in CoWork environment, so for capsulation reasons they can run on their own class instance. thats also why p = pool() stuff has been removed, because now linked to class itself. Has that had a reason which I havent seen? (this would also make sense to one day, if WorkQueue should really rely on CoWork, be able to use same Pool class (but different instnce 
2) some == and <= and the like stuff, implicit bool...has been explicited
3) while(todo)
if(todo == 0)
break;
makes no sense, it wont ever be true, since Finish() holds lock and no other thread can decrement it meanwhile
these are basicly changes, that made sense for me..commit if it makes sense..
next post is the WorkQueue
-
Attachment: CoWork.h
(Size: 0.82KB, Downloaded 400 times)
-
Attachment: CoWork.cpp
(Size: 2.78KB, Downloaded 645 times)
|
|
|
 |
|
what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 07:26
|
 |
|
Re: what about WorkQueue : public CoWork
By: koldo on Wed, 03 February 2010 08:22
|
 |
|
Re: what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 08:58
|
 |
|
first, CoWork.h and CoWork.cpp cleanups
By: kohait00 on Wed, 03 February 2010 12:07
|
 |
|
WorkQueue
By: kohait00 on Wed, 03 February 2010 12:14
|
 |
|
Re: what about WorkQueue : public CoWork
By: mirek on Wed, 03 February 2010 12:36
|
 |
|
Re: what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 13:31
|
 |
|
changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 15:03
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Wed, 03 February 2010 15:08
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 15:14
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Wed, 03 February 2010 20:45
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 21:58
|
 |
|
2 basic problems
By: kohait00 on Mon, 08 February 2010 22:29
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Tue, 09 February 2010 10:56
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Tue, 09 February 2010 15:14
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Mon, 15 February 2010 12:49
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Tue, 16 February 2010 14:44
|
 |
|
BUGFIX to WorkQueue
By: kohait00 on Thu, 18 February 2010 16:02
|
 |
|
Re: BUGFIX to WorkQueue
By: kohait00 on Fri, 19 February 2010 08:47
|
Goto Forum:
Current Time: Thu Aug 28 15:47:31 CEST 2025
Total time taken to generate the page: 0.06765 seconds
|