You could always concatenate the JavaScript files beforehand, then send that to the WorkerPool. Sort of
Step1: result = createConcateScript([url1, url2, url3]) Step2: workerPool.createWorker(result); The Frizione (http://code.google.com/p/frizione/) framework allows you to do this as a semi-automatic process. First define the scripts to concatenate as part of the build process, then send the concatenated script to the workerpool in your production code. Not quite what you're looking for, but possibly an alternative solution. John On Nov 9, 9:27 am, Khookie <[EMAIL PROTECTED]> wrote: > youch! it works but definitely not easy on the eyes! > > Chris > > On Nov 9, 1:08 pm, Aaron Boodman <[EMAIL PROTECTED]> wrote: > > > Yeah, this is an issue. We thought about it awhile ago and decided an > > include() API on the inside of the worker would be better. But we > > haven't implemented it yet :(. > > > Here's a blog entry I wrote that shows how to simulate it, which is > > more involved than it at first seems: > > >http://blog.youngpup.net/2007/09/simulating-include-in-workers.html > > > - a > > > On Sat, Nov 8, 2008 at 6:55 PM, Khookie <[EMAIL PROTECTED]> wrote: > > > > I have js files that I would like to share across multiple worker > > > files. I find it pretty useful myself to avoid code duplication while > > > coding the workers. > > > > For example, I've got a hack function at the moment called > > > createWorkerFromUrls([url1, url2, url3]) where it gets each file via > > > httprequest and waits on a timer until they're all fetched. Then > > > they're joined together and passed to > > > workerPool.createWorker(jsString); > > > > Any possibility of a method like this down the track? > > > > Chris- Hide quoted text - > > > - Show quoted text -
