AtomicKit icon indicating copy to clipboard operation
AtomicKit copied to clipboard

DispatchedValue UUID generation/comparison is possibly not required

Open mylemans opened this issue 6 years ago • 0 comments

According to what I read here http://tom.lokhorst.eu I do not think you need to store and track a UUID at all.

It seems that the pointer of DispatchSpecificKey<> is used as a unique key, so what you could do is just use (for example) DispatchSpecificKey<Bool> as the key, setSpecific any value (true or false, it doesn't matter) and then later on just check if the value isn't nil.

Saving up on generating a UUID, converting it to a string and comparing it. Instead of that, you only store a single Bool and only check for nil.

What are your thoughts?

mylemans avatar Aug 23 '18 10:08 mylemans