What's new? | Help | Directory | Sign in
Google
gears
Improving Your Web Browser
  
  
  
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
TIPS FOR ADDING THREADS SUPPORT TO A NEW PLATFORM:

A useful sequence of investigative steps is:
- Learn how to create a worker thread on the platform.
- And how to wait for the worker to signal an 'init-done' event.
- And how to send/receive messages in a worker thread.
- And how to send/receive messages in the parent thread.
- Learn how to spin up a new JS engine (empty context)
- And how to set the body of code running there.
- And how to insert named objects into that code's globals.
- Learn how to make the main JS thread run code synchronously, relative
to its other JS execution (i.e. wait until code returns to top level).
- And how to pump/handle messages in worker threads.
- Note: thread creator must wait synchronously for JS init code to run.
- Learn how to set/save a JS function token.
- And how to invoke that JS function token.
- Note: parent and workers may require different implementations.
Show details Hide details

Change log

r1 by cprince on May 27, 2007   Diff
Initial checkin.
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 945 bytes, 17 lines