From dc8e62f33ad0ca7a772ec74d67b6d3e157f639b4 Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Wed, 13 Jan 2016 18:33:42 +0100
Subject: Introduce time warp safe replacement for safe_fixed option
The new time warp safe option is safe_fixed_monotonic_time which
gives erlang:monotonic_time().
The safe_fixed option was also slightly changed. It now gives
erlang:timestamp() instead of erlang:now(). This has however
not been documented, so it is considered a compatible change.
The above effects both ets, and dets.
This commit also include the bugfix OTP-13239 for
dets:info(Tab, safe_fixed). The timestamp in the result returned
by dets:info(Tab, safe_fixed) was unintentionally broken as a
result of the time API rewrites in OTP 18.0.
---
lib/stdlib/doc/src/dets.xml | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
(limited to 'lib/stdlib/doc/src/dets.xml')
diff --git a/lib/stdlib/doc/src/dets.xml b/lib/stdlib/doc/src/dets.xml
index a0d3f95b6a..48400733d1 100644
--- a/lib/stdlib/doc/src/dets.xml
+++ b/lib/stdlib/doc/src/dets.xml
@@ -399,15 +399,40 @@
kept in RAM.
-
-
{safe_fixed, SafeFixed}. If the table
- is fixed, SafeFixed is a tuple {FixedAtTime, [{Pid,RefCount}]}. FixedAtTime is the time when
+
{safe_fixed_monotonic_time, SafeFixed}. If the table
+ is fixed, SafeFixed is a tuple {FixedAtTime, [{Pid,RefCount}]}.
+ FixedAtTime is the time when
the table was first fixed, and Pid is the pid of
the process that fixes the table RefCount times.
There may be any number of processes in the list. If the
table is not fixed, SafeFixed is the atom false.
+ FixedAtTime will correspond to the result
+ returned by
+ erlang:monotonic_time/0
+ at the time of fixation. The usage of safe_fixed_monotonic_time is
+ time warp
+ safe.
-
-
{version, integer(), the version of the format of
+
+ {safe_fixed, SafeFixed}. The same as
+ {safe_fixed_monotonic_time, SafeFixed} with the exception
+ of the format and value of FixedAtTime.
+
+
+ FixedAtTime will correspond to the result returned by
+ erlang:timestamp/0
+ at the time of fixation. Note that when the system is using
+ single or multi
+ time warp
+ modes this might produce strange results. This
+ since the usage of safe_fixed is not
+ time warp
+ safe. Time warp safe code need to use
+ safe_fixed_monotonic_time instead.
+
+ -
+
{version, integer()}, the version of the format of
the table.
--
cgit v1.2.3