Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a limited implementation of the OTP ets interface #1054

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

fadushin
Copy link
Collaborator

This PR implements a small subset of the OTP ets interface.

The following ets functions are supported:

  • ets:new/2
  • ets:insert/2
  • ets:lookup/2
  • ets:delete/2

The following parameters to ets:new/2 are supported:

  • is_named
  • {keypos, I :: non_neg_integer()}
  • private | protected | public access types

Only the set table type is supported.

This limited functionality allows users to define ETS tables and share term data between processes in a manner that is more efficient than using message passing with a process. The likely initial users of this feature will be the logging subsystem, as well as parts of the (forthcoming) application support, for storing application environment settings.

This PR provides a partial implementation of issue #887. Subsequent PRs can add additional features from this issue.

For information about the OTP ets interface, see https://www.erlang.org/doc/man/ets. This implementation attempts to be API-compatible with the OTP implementation.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

doc/src/programmers-guide.md Outdated Show resolved Hide resolved
doc/src/programmers-guide.md Outdated Show resolved Hide resolved
Signed-off-by: Fred Dushin <fred@dushin.net>
@fadushin fadushin marked this pull request as ready for review March 6, 2024 03:27
@bettio bettio merged commit fb3195c into atomvm:main Apr 4, 2024
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants