From: stephan b. <st...@s1...> - 2004-12-20 01:28:33
|
Yo again, i'm looking through the thread docs, and a couple things aren't clear to me: - What is the conceptual difference between ThreadJob and Thread? It seems that ThreadJob is a simplified form of Thread? - i think ThreadJob's ctor is broken: ThreadJob(ThreadPool *p) Subclasses of ThreadJob which call this ctor will be queued into p before they are actually finished construction, which means they may (?) begin execution before they are completely finished constructing. What i want to do is be able to start N apps in my framework and keep track of them in some container. When a thread dies (app is closed) i'll need to update my container, which i can do via Thread::final() (it would seems) and by locking the container. What i'm not clear on is whether i should use Thread or ThreadJob as a basis for doing this. Also, what would be the most straightforward way to lock a container using P's API? (i have almost no experience with MT, mutexes, etc.) Ideas? -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |