Perform a clean shutdown.
Waits for all the currently scheduled work to finish, kills the workers, and closes the connection pool.
Ensure your code does not submit new work while the connection is closing.
Where possible, it is recommended you use a context manager (a
with Client.from_config(...) asconstruct) to ensure your code properly closes all resources.
This example creates a client (based on an auto-detected configuration file), executes some code (represented by a placeholder comment), and then closes the client.
>>> from dwave.cloud import Client >>> client = Client.from_config() # doctest: +SKIP >>> # code that uses client >>> client.close() # doctest: +SKIP