Fixes bug 84489. Ensures that worker threads can not process the same reque

st at the same time. r-danm@netscape.com, sr-darin@netscape.com, a-clayton@n
etscape.com
This commit is contained in:
dougt%netscape.com 2001-06-12 18:35:23 +00:00
parent 330156b06e
commit ea1c9a9cab

View File

@ -90,6 +90,8 @@ public:
virtual ~nsThreadPool();
nsIRunnable* GetRequest(nsIThread* currentThread);
void RequestDone(nsIRunnable *request);
static PRBool InterruptThreads(nsISupports* aElement,
void *aData);
@ -101,12 +103,13 @@ protected:
nsresult RemoveThread(nsIThread* currentThread);
nsCOMPtr<nsISupportsArray> mThreads;
nsCOMPtr<nsISupportsArray> mRequests;
nsCOMPtr<nsISupportsArray> mPendingRequests;
nsCOMPtr<nsISupportsArray> mRunningRequests;
PRLock* mLock;
PRCondVar* mThreadExit;
PRCondVar* mRequestAdded;
PRCondVar* mRequestsAtZero;
PRCondVar* mPendingRequestAdded;
PRCondVar* mPendingRequestsAtZero;
PRUint32 mStackSize;