From ea1c9a9cab4f230acdc8c40c4c2bd0c7f1b1ed6a Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Tue, 12 Jun 2001 18:35:23 +0000 Subject: [PATCH] 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 --- xpcom/threads/nsThread.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xpcom/threads/nsThread.h b/xpcom/threads/nsThread.h index dc40ecca2f22..8bd1a74815f6 100644 --- a/xpcom/threads/nsThread.h +++ b/xpcom/threads/nsThread.h @@ -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 mThreads; - nsCOMPtr mRequests; + nsCOMPtr mPendingRequests; + nsCOMPtr mRunningRequests; PRLock* mLock; PRCondVar* mThreadExit; - PRCondVar* mRequestAdded; - PRCondVar* mRequestsAtZero; + PRCondVar* mPendingRequestAdded; + PRCondVar* mPendingRequestsAtZero; PRUint32 mStackSize;