Atomic ets

Thomas Lindgren thomasl_erlang@REDACTED
Tue Dec 13 17:02:03 CET 2005



--- "Ulf Wiger (AL/EAB)" <ulf.wiger@REDACTED>
wrote:

>  
> Thomas Lindgren wrote:
> >
> > 1. Am I being dense in writing my ets code? Are
> there simple, 
> > useful ways to write ets code that avoids the
> problem of 
> > getting preempted between, say, a lookup and an
> insert?
> 
> Well, yes (on the second question). 

Phew :-)

> You can make
> sure that 
> all updates to a table are serialized using e.g. a
> gen_server.

It depends on what sort of operations are being done
against the table, but yes, you're right -- I've used
that technique too and should have mentioned it. 

For each read-modify-write, you get an (optimizable)
trip to the gen_server, which makes me a bit uneasy.
Anyway, what I'd prefer is a "serverless" solution.
(Or maybe I should just bite the bullet?)

Best,
Thomas


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list