[stringtemplate-interest] thread safety

Terence Parr parrt at cs.usfca.edu
Fri Nov 13 12:08:31 PST 2009


On Nov 13, 2009, at 11:55 AM, John D. Mitchell wrote:
>> Oh right. cache invalidation / reload would need to be atomic.  I'll
>> have to lock for that.
>
> Should be cheap as you're just swapping a pointer to the newly loaded
> & compiled object, right?

Should be something like "load in background then swap with single  
ptr".  that should be thread safe, right? ptr assign is atomic.

T


More information about the stringtemplate-interest mailing list