close
Closes this session synchronously on its owner thread.
Close is idempotent after completion and transitions to closed before finalizer work begins. Cleanup visits bindings and retained tree ownership exactly once, continues after failures, and rethrows the exact first cleanup failure with later distinct failures suppressed. Closing a failed session only records the closed state because failure cleanup already ran.
Throws
when called from the wrong thread or from another active operation; recursive close from close cleanup is a no-op.
when finalizer cleanup fails; the first failure remains primary with later distinct failures suppressed.