Is there any API for an atomic `Set`? I know that ...
# coroutines
b
Is there any API for an atomic
Set
? I know that I can use
AtomicRefenrece
but its api is not really good.
z
Why not just use a lock?
b
That's another option. Sure. But because there is a AtomicArray I was expecting the other collections to have the same.
w
Often people use AtomicMap and just stuff something like Unit in the value. You can even use the keySet view if you really need the set interface for the read side.