Geek
Geek

Reputation: 708

Global variables in erlang

How to create global variables in Erlang. One way i have tried is using the mnesia tables. But for this we have to use database(mnesia) itself. Is there any other method ?

Upvotes: 1

Views: 675

Answers (1)

legoscia
legoscia

Reputation: 41618

Other ways are using ETS tables (simpler to use than Mnesia, but don't offer distribution, persistence or transactions), or using a gen_server process to store global values.

Upvotes: 4

Related Questions