8

Is JavaScript multithreading possible in IE6?

Are there any third party libraries for this?

6 Answers 6

11

JavaScript does not support native multithreading in current web browsers. Even if it did, I bet IE 6 wouldn't have supported it :)

Running your scripts in multiple iframes could be one workaround, as Jason Kester suggested in another answer.

In addition, for modern browsers you might be interested in checking out Web Workers, but this is definitely something out of the IE 6's league:

Sign up to request clarification or add additional context in comments.

3 Comments

@luiscubal Yes good point. They are in fact mentioned in the post I linked to originally. Modified my answer to include some further info.
Why would you want IE6 to support even more error-ridden features?
Edison : To force the user to ultimately give up IE6 and use an actual browser
3

Run your tasks in IFrames

Assuming you're talking about multitasking on the client side, you can open n frames on your page, each pointed to a page on your domain.

There are lots of ways to architect it from there. Probably the easiest would be to have a single .js include that you run from each frame. It phones home to parent.readyToGo() or whatever, and gets some work assigned. The worker methods can call something like parent.taskFinished() to report when they're done.

Most importantly, don't listen to anybody telling you not to run your mission critical multithreaded javascript application on IE6. I'm sure you have good reasons:)

Comments

2

There is no way - definitely not in IE6. You can fake it by using lots of window.setTimeout()s.

See Why doesn't JavaScript support multithreading?

Comments

2

Well, HTML5 is coming up with Web-Workers. But i highly doubt there is a library which creates a wrapper for using it in IE6.

Does my browser support web workers?

Comments

1

Google Gears is a plugin that works with IE6 and includes something called WorkerPools. Google Gears does not seem like it is being very actively developed anymore, because it has tried to move most of the ideas of Gears into HTML5. WorkerPools are basically background processes that do not share state and only communicate through messages. In HTML5 this has turned into WebWorkers. You can find more info here: http://code.google.com/apis/gears/api_workerpool.html

Comments

1

If you merely want to write synchronous code and thus avoid having to deal with writing event handlers all over the place, you can try: Strands

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.