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

Improve uniqueness of connection_ids #289

Open
mdickinson opened this issue Mar 29, 2021 · 2 comments
Open

Improve uniqueness of connection_ids #289

mdickinson opened this issue Mar 29, 2021 · 2 comments
Labels
type: refactor Cleanup or refactoring tasks that don't add functionality or fix bugs

Comments

@mdickinson
Copy link
Member

Context: connection ids are integers used to match message senders with the paired message receivers for a given executor.

Currently the message routers use connection ids that are simple integers, and always start counting from zero.

To aid diagnosis in cases where things go wrong, it may make sense to use some kind of UUID instead. In theory this shouldn't be necessary, but we've seen some rather strange failure modes on Windows where it seems possible that distinct QObjects with non-overlapping lifetimes that happen to exist at the same memory address are being confused with each other at Qt / PyQt level.

@mdickinson
Copy link
Member Author

but we've seen some rather strange failure modes on Windows

The explanations for these failure modes turned out to be rather more prosaic: tasks were being submitted from worker threads (see #305). However, more unique connection ids may still be a good idea.

@mdickinson
Copy link
Member Author

Also, while we're here, "connection_id" is a strange name. "task_id" may be better.

@mdickinson mdickinson added the type: refactor Cleanup or refactoring tasks that don't add functionality or fix bugs label Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Cleanup or refactoring tasks that don't add functionality or fix bugs
Projects
None yet
Development

No branches or pull requests

1 participant