dwave.cloud.client.Client.close#
- Client.close()[source]#
Perform a clean shutdown.
Waits for all the currently scheduled work to finish, kills the workers, and closes the connection pool.
Where possible, it is recommended you use a context manager (a
with Client.from_config(...) as
construct) to ensure your code properly closes all resources.Examples
This example creates a client, executes some code (represented by a placeholder comment), and then closes the client.
>>> from dwave.cloud import Client >>> client = Client.from_config() >>> # code that uses client >>> client.close()