10 messages in com.googlegroups.google-gearsRe: [google-gears] Global variable an...
FromSent OnAttachments
Sam03 Oct 2007 13:02 
Scott Hess03 Oct 2007 13:17 
Scott Hess03 Oct 2007 13:19 
Aaron Boodman03 Oct 2007 13:35 
Sam04 Oct 2007 00:06 
Sam04 Oct 2007 00:21 
Aaron Boodman04 Oct 2007 01:00 
Sam04 Oct 2007 02:55 
Sam04 Oct 2007 03:00 
Scott Hess04 Oct 2007 09:32 
Subject:Re: [google-gears] Global variable and DB locks in worker pool,
From:Scott Hess (sh.@google.com)
Date:10/03/2007 01:19:54 PM
List:com.googlegroups.google-gears

On 10/3/07, Sam <savi@yahoo.co.in> wrote:

1. I'd like to create a variable that is global for all the workers in the worker pool. To be clearer, if I have six workers parsing a portion of a file, I'd like them to store the parsed result in a common variable, rather then passing it back again to the parentHandler (to prevent all the JSON conversions). Is this possible?

Workers have no concepts such as shared memory or locks or anything of that nature. This is intentional, so it's unlikely to change, though if we start to see identifiable classes of usage which are constrained by the JSON conversions, it's likely we'll figure out ways to make things better. [For instance, one could imagine having a shared hash of some sort.]

-scott