dwave-system icon indicating copy to clipboard operation
dwave-system copied to clipboard

have to close client threads

Open kumagaimasahito opened this issue 5 years ago • 1 comments

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.

kumagaimasahito avatar Dec 14 '19 03:12 kumagaimasahito

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, https://github.com/dwavesystems/dwave-cloud-client/issues/217

arcondello avatar Dec 18 '19 17:12 arcondello