3 messages in com.googlegroups.google-gearsRe: Thread-safe Array/Queue/Stack
FromSent OnAttachments
Dimitri Glazkov10 Nov 2007 18:04 
Dimitri Glazkov11 Nov 2007 08:41 
Dimitri Glazkov11 Nov 2007 09:26 
Subject:Re: Thread-safe Array/Queue/Stack
From:Dimitri Glazkov (dimi@gmail.com)
Date:11/11/2007 09:26:25 AM
List:com.googlegroups.google-gears

It is also entirely possible that I am looking at this all wrong, in which case I kindly request guidance.

I apologize for being too terse. By "storage", I mean in-memory only data structures. For example, I have multiple async calls adding items to the same queue, then one reader deq'ing them out for synchronous processing. I could ensure thread-safety by moving this structure to SQL, but doesn't this seem too heavy-weight?

:DG<

On 11/10/07, Aaron Boodman <a.@google.com> wrote:

I don't understand -- the only storage that is accessible to multiple threads is the database, and it is inherently thread-safe. Can you give a little more background on what you're trying to do?

- a

On 11/10/07, Dimitri Glazkov <dimi@gmail.com> wrote:

I was wondering what team's thoughts are on introducing some sort of thread-safe storage as part of the WorkerPool module? I could've really used a thread-safe queue (rwl lock, or spin-lock, whichever) right now. Though I am getting by with a good ole Array for the moment, it seems like this type of functionality would be a natural extension of Gears capabilities.

You know what they say: if you do a-splittin', you gots to do a-muxing.

:DG<