mozilla

Revision 58777 of The Thread Manager

  • Revision slug: The_Thread_Manager
  • Revision title: The Thread Manager
  • Revision id: 58777
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment fix name of a method

Revision Content

{{template.Fx_minversion_header(3)}} {{template.Draft()}}

The Thread Manager, introduced in Firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing.

There are several interfaces that provide threading support:

{{template.Interface("nsIThreadManager")}}
The Thread Manager itself lets you create threads.
{{template.Interface("nsIThread")}}
The nsIThread interface encapsulates an operating system thread, providing easy cross-platform access to multithreading in your code.
{{template.Interface("nsIThreadPool")}}
A thread pool provides a limited set of worker threads. When you dispatch an event to the pool, the pool selects an available worker thread to process the event.
{{template.Interface("nsIThreadInternal")}}
A subclass of {{template.Interface("nsIThread")}} that is implemented by the XPCOM thread object to add support for observing dispatch activity on a thread.
{{template.Interface("nsIThreadObserver")}}
Provides the ability to monitor a thread, to receive notifications when events are dispatched to it and when they're finished being processed.
{{template.Interface("nsIThreadEventFilter")}}
This interface is used by the pushEventQueue() method in {{template.Interface("nsIThreadInternal")}} to allow event filtering.

Revision Source

<p>{{template.Fx_minversion_header(3)}}
{{template.Draft()}}
</p><p>The Thread Manager, introduced in Firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing.
</p><p>There are several interfaces that provide threading support:
</p>
<dl><dt>{{template.Interface("nsIThreadManager")}}
</dt><dd>The Thread Manager itself lets you create threads.
</dd><dt>{{template.Interface("nsIThread")}}
</dt><dd>The <code>nsIThread</code> interface encapsulates an operating system thread, providing easy cross-platform access to multithreading in your code.
</dd><dt>{{template.Interface("nsIThreadPool")}}
</dt><dd>A thread pool provides a limited set of worker threads.  When you dispatch an event to the pool, the pool selects an available worker thread to process the event.
</dd><dt>{{template.Interface("nsIThreadInternal")}}
</dt><dd>A subclass of {{template.Interface("nsIThread")}} that is implemented by the XPCOM thread object to add support for observing dispatch activity on a thread.
</dd><dt>{{template.Interface("nsIThreadObserver")}}
</dt><dd>Provides the ability to monitor a thread, to receive notifications when events are dispatched to it and when they're finished being processed.
</dd><dt>{{template.Interface("nsIThreadEventFilter")}}
</dt><dd>This interface is used by the <code><a href="en/NsIThreadInternal#pushEventQueue.28.29">pushEventQueue()</a></code> method in {{template.Interface("nsIThreadInternal")}} to allow event filtering.
</dd></dl>
Revert to this revision