Raxol.Performance.ETS.TableHelper (Raxol v2.6.0)

View Source

Shared utilities for ETS table lifecycle management.

Summary

Functions

Creates a named ETS table if it doesn't already exist. Returns the table name (atom) in all cases.

Functions

ensure_table(name, opts \\ [:set, :public, :named_table])

@spec ensure_table(atom(), list()) :: atom()

Creates a named ETS table if it doesn't already exist. Returns the table name (atom) in all cases.

Examples

ensure_table(:my_cache, [:set, :public, :named_table])
ensure_table(:my_cache, [:set, :public, :named_table, read_concurrency: true])