On Mon, Apr 06, 2009 at 10:27:59AM +0200, Michael Mueller wrote:
> Are associative arrays thread-safe as well? For example
> 
>       a["some-string"] += 1;

No; they act just like global variables.

Cheers,
- jonathan

> Michael
> 
> Adam Leventhal wrote:
> > On Apr 5, 2009, at 2:47 AM, Michael Mueller wrote:
> >> So does this mean that accessing aggregations is guaranteed to be thread
> >> safe? Does this also apply to accessing associative arrays?
> > 
> > 
> > Yes, aggregations are scalable and thread-safe. One thing we've considered
> > adding is some sort of explicit atomic operation for global variables, but
> > in the vast majority of cases, aggregations are the right answer.
> > 
> > Adam
> > 
> > -- 
> > Adam Leventhal, Fishworks                        http://blogs.sun.com/ahl
> > 
> > 
> 
> 
> -- 
> 
> === Michael Mueller ==================
> Web: http://www.michael-mueller-it.de
> ======================================
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to