cadrumo.adapters.persistence.storage.custody._kdf_windows_job module¶
Windows Job Object boundary for the supervised profile KDF worker.
The Job Object structures below are laid out with ctypes.wintypes, which
raises on import on every platform that is not Windows – its VARIANT_BOOL
names a _type_ the other platforms do not support. Importing this module
therefore has to stay safe everywhere, because the KDF process boundary that
consumes _WindowsJob is imported on every platform.
The module-level sys.platform == "win32" block is what makes that true, and
it is also the only guard shape every checker this project runs narrows on, so
the Windows API resolves when the tree is analysed for Linux or macOS. The
else branch is the same boundary on a platform that has no Job Object: it
refuses, exactly as the supervisor would if the object could not be created.