[erlang-questions] Initializing mnesia

Vance Shipley vances@REDACTED
Fri Oct 9 03:56:11 CEST 2015


On Fri, Oct 9, 2015 at 4:38 AM,  <lloyd@REDACTED> wrote:
> init() ->
>     mnesia:create_schema([node()]),
>     mnesia:start(),
>     mnesia:create_table(....

You need to wait until your tables are created before you can use them:

          mnesia:create_schema([node()]),
          wait_for_tables([schema], 10000)
          mnesia:start(),
          mnesia:create_table(....
          wait_for_tables(...


-- 
     -Vance



More information about the erlang-questions mailing list