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

have to close client threads #241

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kumagaimasahito
Copy link

I faced a problem that 'You can't create a new thread'.
The library 'dwave-system' have client.close(), but DWaveSampler didn't close threads.
Sorry, but I think you may have to add this pull request.

@arcondello
Copy link
Member

Hi @kumagaimasahito, I think it would be better to implement this as a close method. The reason is that it is allowed (though poor practice) to do

sampler = DWaveSampler()
client = sampler.client
del sampler

Which would then (perhaps unexpectedly) close the client. I think close would be a lot more explicit (and close an existing issue #77)

See also #91, dwavesystems/dwave-cloud-client#217

@arcondello arcondello self-requested a review December 18, 2019 17:28
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

Successfully merging this pull request may close these issues.

2 participants