a couple of shutdown related things: added an mThreadRunning member, and made thread PR_JOINABLE
git-svn-id: svn://10.0.0.236/trunk@69514 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -66,17 +66,14 @@ nsLDAPService::Init(void)
|
||||
|
||||
NS_ASSERTION(!mThread, "nsLDAPService already initialized!");
|
||||
|
||||
// XXX check params
|
||||
//
|
||||
rv = NS_NewThread(getter_AddRefs(mThread),
|
||||
this, 0, PR_JOINABLE_THREAD,
|
||||
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD);
|
||||
this, 0, PR_JOINABLE_THREAD);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// for nsIRunnable
|
||||
// for nsIRunnable. all the processing work happens here.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsLDAPService::Run(void)
|
||||
@@ -85,6 +82,12 @@ nsLDAPService::Run(void)
|
||||
PR_fprintf(PR_STDERR, "nsLDAPService::Run() entered!\n");
|
||||
#endif
|
||||
|
||||
// XXX - should use mThreadRunning here
|
||||
//
|
||||
while (1) {
|
||||
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ class nsLDAPService : public nsIRunnable
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIThread> mThread;
|
||||
PRBool mThreadRunning;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user