Table of Contents

Class LockManager

Namespace
DuetControlServer.IPC
Assembly
DuetControlServer.dll

Class to manage read/write locks of third-party plugins

public class LockManager
Inheritance
LockManager
Inherited Members

Constructors

LockManager(ObjectModel)

Class to manage read/write locks of third-party plugins

public LockManager(ObjectModel model)

Parameters

model ObjectModel

Object model

Properties

IsLocked

Indicates if a third-party application has locked the object model for writing

public bool IsLocked { get; }

Property Value

bool

Methods

LockMachineModel(Connection, CancellationToken)

Function to create a read/write lock to the object model

public void LockMachineModel(Connection connection, CancellationToken cancellationToken = default)

Parameters

connection Connection

Connection that is locking the model

cancellationToken CancellationToken

Optional cancellation token

LockMachineModelAsync(Connection, CancellationToken)

Function to create a read/write lock to the object model

public Task LockMachineModelAsync(Connection connection, CancellationToken cancellationToken = default)

Parameters

connection Connection

Connection that is locking the model

cancellationToken CancellationToken

Optional cancellation token

Returns

Task

Asynchronous task

UnlockMachineModel(Connection)

Unlock the machine model again

public void UnlockMachineModel(Connection connection)

Parameters

connection Connection

Connection that is unlocking the model