10 messages in com.googlegroups.google-gearsRe: Experimenting with the WorkerPool...
FromSent OnAttachments
Aaron Boodman (Google)04 Jun 2007 00:25 
Muthu Ramadoss04 Jun 2007 03:29 
bribus05 Jul 2007 00:55 
Aaron Boodman05 Jul 2007 02:09 
bribus05 Jul 2007 02:25 
bribus05 Jul 2007 02:56 
bribus05 Jul 2007 03:45 
Aaron Boodman05 Jul 2007 08:18 
bribus06 Jul 2007 00:13 
neyric19 Jul 2007 04:05 
Subject:Re: Experimenting with the WorkerPool API
From:neyric (eric@gmail.com)
Date:07/19/2007 04:05:42 AM
List:com.googlegroups.google-gears

Great ! I'm just missing a feature i'm trying to add : do XHR from the worker. The worker has to send a message to the parent thread that does the request and send back the result to the worker. It schouldn't be hard to implement on top of your code...

For those who, like me, use YUI : Here is a hack to replace the doRequest function from the xhr.js file using YUI :

function doRequest(method, url, postData, callbackFct) { var successFunc = function(o) { callbackFct(o.status, o.statusText, o.responseText); }; var xhr = YAHOO.util.Connect.asyncRequest(method, url, { success: successFunc}, postData); return function() { YAHOO.util.Connect.abort(xhr); }; };

Don't forget to include : (or from your server...) <script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/ build/yahoo/yahoo-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/ build/connection/connection-min.js"></script>