Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DispatchedValue UUID generation/comparison is possibly not required #1

Open
mylemans opened this issue Aug 23, 2018 · 0 comments
Open

Comments

@mylemans
Copy link

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 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant