A generalized approach to turn a functional data structure into a lock-free starvation avoiding data structure
Any functional data structure can be turned into a lock-free data structure by
wrapping it inside an Atomic
. For example, consider the following set
implementation:
module Identity_set : sig
type 'a t
val empty : 'a t