Class InventoryLock
Represents a lock acquired by a thread on one or more inventories.
Inheritance
System.Object
InventoryLock
Implements
System.IDisposable
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public sealed class InventoryLock : Object, IDisposable
Constructors
InventoryLock(IEnumerable<Inventory>)
Declaration
public InventoryLock(IEnumerable<Inventory> inventories)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Inventory> | inventories |
Properties
CreationTime
Can be used to detect if lock is stuck (deadlock).
Declaration
public long CreationTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
DebugSortedLockedObjects
Declaration
public Inventory[] DebugSortedLockedObjects { get; }
Property Value
| Type | Description |
|---|---|
| Inventory[] |
Disposed
Declaration
public bool Disposed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsHeldByCurrentThread
Returns true if the current thread already holds an inventory lock. Useful for deferring operations that would acquire a new lock to avoid deadlocks.
Declaration
public static bool IsHeldByCurrentThread { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
Dispose()
Declaration
public void Dispose()
GetCreationStacktrace()
Declaration
public string GetCreationStacktrace()
Returns
| Type | Description |
|---|---|
| System.String |
Implements
System.IDisposable