Linux Mac OSX Windows

Implemented by

 An interface for creating and locating nsIThread instances.
[scriptable, uuid(056216f5-8803-46b4-9199-d95bc1f0446f)]
interface nsIThreadManager : nsISupports

Attributes

 Get the current thread.  If the calling thread does not already have a
 nsIThread associated with it, then a new nsIThread will be created and
 associated with the current PRThread.
readonly attribute nsIThread currentThread
 This attribute is true if the calling thread is the main thread of the
 application process.
readonly attribute boolean isMainThread
 Get the main thread.
readonly attribute nsIThread mainThread

Methods

 Get the nsIThread object (if any) corresponding to the given PRThread.
 This method returns null if there is no corresponding nsIThread.

 @param prthread
   The PRThread of the nsIThread being requested.

 @returns
   The nsIThread object corresponding to the given PRThread or null if no
   such nsIThread exists.
[noscript] nsIThread getThreadFromPRThread(in PRThread prthread)
 Create a new thread (a global, user PRThread).

 @param creationFlags
   Reserved for future use.  Pass 0.

 @returns
   The newly created nsIThread object.
nsIThread newThread(in unsigned long creationFlags)