From 24524dbd7867a27ba0550dbfd2c3fafed5ae0ca5 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Wed, 6 Oct 2010 10:53:49 +0200
Subject: Documentation update to ETS and drivers
State more clearly that ETS functions will throw badarg if calling
process lacks access right. And that driver stop callback should free
memory allocted by start.
---
lib/stdlib/doc/src/ets.xml | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
(limited to 'lib/stdlib/doc/src')
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index dd4a289c61..702e1b928e 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -56,8 +56,8 @@
Even if there are no references to a table from any process, it
will not automatically be destroyed unless the owner process
terminates. It can be destroyed explicitly by using
- delete/1.
- Since R13B01, table ownership can be transferred at process termination
+ delete/1. The default owner is the process that created the
+ table. Table ownership can be transferred at process termination
by using the heir option or explicitly
by calling give_away/3.
Some implementation details:
@@ -82,11 +82,15 @@
float() that extends to the same value, hence the key
1 and the key 1.0 are regarded as equal in an
ordered_set table.
- In general, the functions below will exit with reason
- badarg if any argument is of the wrong format, or if the
- table identifier is invalid.
-
+
+ Failure
+ In general, the functions below will exit with reason
+ badarg if any argument is of the wrong format, if the
+ table identifier is invalid or if the operation is denied due to
+ table access rights (protected
+ or private).
+
Concurrency
This module provides some limited support for concurrent access.
@@ -947,7 +951,7 @@ ets:select(Table,MatchSpec),
Name = atom()
Options = [Option]
- Option = Type | Access | named_table | {keypos,Pos} | {heir,pid(),HeirData} | {heir,none} | {write_concurrency,bool()}
+ Option = Type | Access | named_table | {keypos,Pos} | {heir,pid(),HeirData} | {heir,none} | {write_concurrency,bool()} | {read_concurrency,bool()}
Type = set | ordered_set | bag | duplicate_bag
Access = public | protected | private
Pos = int()
@@ -963,7 +967,7 @@ ets:select(Table,MatchSpec),
table is named or not. If one or more options are left out,
the default values are used. This means that not specifying
any options ([]) is the same as specifying
- [set,protected,{keypos,1},{heir,none},{write_concurrency,false}].
+ [set,protected,{keypos,1},{heir,none},{write_concurrency,false},{read_concurrency,false}].
-
set
@@ -1002,12 +1006,14 @@ ets:select(Table,MatchSpec),
Any process may read or write to the table.
-
+
protected
The owner process can read and write to the table. Other
processes can only read the table. This is the default
setting for the access rights.
-
+
private
Only the owner process can read or write to the table.
--
cgit v1.2.3