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

HostManager should fully own devices #2384

Closed
jackm321 opened this issue Feb 13, 2019 · 0 comments
Closed

HostManager should fully own devices #2384

jackm321 opened this issue Feb 13, 2019 · 0 comments

Comments

@jackm321
Copy link
Contributor

DeviceManagers are stored as shared_ptrs but they should be unique_ptrs because they are really owned by HostManager.

using DeviceManagerMapTy = std::map<DeviceIDTy, std::shared_ptr<DeviceManager>>;

I think the blocker here is that HostManager::clearHost() won't block on in flight requests #2297 so the ownership of DeviceManager isn't as strong as it should be. HostManager can be deleted but the underlying devices can still be left around running in-flight requests which is why they need to be shared pointers now. Once that is addressed, the ownership model should be improved and these can be safely made unique_ptrs.

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