The session_lifecycle.py module#

Summary#

run_locked

Serialize solver work with shutdown and wait for canceled workers.

wait_for_completion

Wait through repeated caller cancellation without canceling a worker.

session_endpoint

Describe the actual connection without including its credentials.

cleanup_sessions

Retain failed cleanup handles so a new launch cannot orphan them.

Description#

Thread coordination for solver operations and synchronous shutdown.

Module detail#

async session_lifecycle.run_locked(backend, function, *args, **kwargs)#

Serialize solver work with shutdown and wait for canceled workers.

async session_lifecycle.wait_for_completion(task)#

Wait through repeated caller cancellation without canceling a worker.

session_lifecycle.session_endpoint(solver)#

Describe the actual connection without including its credentials.

session_lifecycle.cleanup_sessions(backend, active)#

Retain failed cleanup handles so a new launch cannot orphan them.

session_lifecycle.logger#