Skip to main content

Module lock

Module lock 

Source
Expand description

Container locking utilities for deadlock-free multi-container operations.

This module provides types for safely locking multiple containers in a deterministic order to prevent deadlocks when performing operations that span multiple inventories (e.g., transferring items between containers).

Structsยง

ContainerId
Unique identifier for a container based on Arc pointer address.
ContainerLockGuard
A guard that holds locks on multiple containers in a deterministic order.
ContainerOwner ๐Ÿ”’
ContainerRef
A reference to a container that can be locked.
LockedContainer ๐Ÿ”’

Type Aliasesยง

ContainerChangedCallback ๐Ÿ”’
SharedContainer
Thread-safe reference to an erased container.