DETS并发? (二郎)
DETS concurrency? (Erlang)
我知道 ETS 的并发性有限,例如,同时对同一行的两次写入不会发生冲突。但我似乎无法为 DETS 找到此类信息。有人知道吗?
请注意,我不是在 Mnesia 的支持下询问 DETS 运行,我也不是在询问任何特定的方案 - 比如说为 DETS [=16= 的每行分配一个进程].我只想知道DETS的有限并发保证是什么,如果有的话。
谢谢。
据我所知,DETS目前不支持并发。
来自dets
manual(我的亮点):
It is worth noting that the ordered_set type present in Ets is not yet
implemented by Dets, neither is the limited support for concurrent
updates which makes a sequence of first and next calls safe to use on
fixed Ets tables. Both these features will be implemented by Dets in a
future release of Erlang/OTP. Until then, the Mnesia application (or
some user implemented method for locking) has to be used to implement
safe concurrency. Currently, no library of Erlang/OTP has support for
ordered disk based term storage.
我知道 ETS 的并发性有限,例如,同时对同一行的两次写入不会发生冲突。但我似乎无法为 DETS 找到此类信息。有人知道吗?
请注意,我不是在 Mnesia 的支持下询问 DETS 运行,我也不是在询问任何特定的方案 - 比如说为 DETS [=16= 的每行分配一个进程].我只想知道DETS的有限并发保证是什么,如果有的话。
谢谢。
据我所知,DETS目前不支持并发。
来自dets
manual(我的亮点):
It is worth noting that the ordered_set type present in Ets is not yet implemented by Dets, neither is the limited support for concurrent updates which makes a sequence of first and next calls safe to use on fixed Ets tables. Both these features will be implemented by Dets in a future release of Erlang/OTP. Until then, the Mnesia application (or some user implemented method for locking) has to be used to implement safe concurrency. Currently, no library of Erlang/OTP has support for ordered disk based term storage.