Search code examples
erlangets

Share ETS table with two processes?


I create ETS table in one process and I want use it in another process. How I "open" ETS table in second process? Could not find good function in man pages.


Solution

  • you have to create ets table with 'named_table' and 'public' options.

    like

    T = ets:new(yourtablename,[public,named_table]).
    

    in that case other local processes can use this table by name 'yourtablename'. It's not necessary to explicitly open this table in other processes.