U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » what about WorkQueue : public CoWork
changed CoWork and derived WorkQueue [message #24899 is a reply to message #24897] Wed, 03 February 2010 15:03 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi there, here comes a changed CoWork, which now basicly is able to specify wheather to use common/static threadpool or own thread pool (is beeing decided in CoWork() based on threadnr < 0 -> common pool)

the WorkQueue then is a simple derived class, which specifies 1 for threadnr and thus uses own thread.

this is subject to test Smile.. if anyone besides me would need that.

regarding wild CoWork ctor init list:
it might be that the init order could differ, so the One<Pool> _opool could be not initialized before setting up pool.
this could be changed in a way that pool() -> pool(int threadnr = -1, CoWork * _this) returns either the global pool or costructs One<Pool>, which now is done in CoWork init list Smile

comments welcome
  • Attachment: CoWork.h
    (Size: 1.17KB, Downloaded 492 times)
  • Attachment: CoWork.cpp
    (Size: 2.96KB, Downloaded 867 times)

[Updated on: Wed, 03 February 2010 15:06]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DnD hangs in MT Refresh()ing
Next Topic: Linux MT problems with time functions
Goto Forum:
  


Current Time: Sat May 23 07:11:18 GMT+2 2026

Total time taken to generate the page: 0.00741 seconds