threads - use them as much as you can

Thomas Lindgren thomasl@REDACTED
Mon Nov 27 17:28:12 CET 2000


> | As for global variables, I have two words: Ets. Tables.
> 
> Yup, which are clean as far as concurrent access is concerned. Java is not.

Well, to a limited extent. Most individual operations (insert, lookup, 
update_counter, ...) appear to be atomic, which is good.

On the other hand, the ets man page for R7B states "This module
provides very limited support for concurrent updates." It then
explains safe_fixtable, and tells us to use mnesia if locking or
transactions are required. The problem appears to be first/next.

A related problem is how to construct a simple, guaranteed read-modify-write
function on a (public) ets-table, even involving a single location. 
Is there some way to do that in Erlang without involving mnesia?
(Needless to say, I've fiddled a bit with this and failed.)

		     Thomas
--
Thomas Lindgren					thomasl+junk@REDACTED
Alteon WebSystems				http://www.bluetail.com



More information about the erlang-questions mailing list