Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Lock Modes

Use the following lock modes, defined in LOCK_MODE enum, when calling Lock():

Lock Mode

Explanation

FREE_LOCK

Free all locks.

READ_LOCK

Non-blocking read lock. If the lock cannot be acquired an error is returned.

READ_BLOCK_LOCK

Blocking read lock. The thread will block until the lock can be acquired.

WRITE_LOCK

Non-blocking write lock. If the lock cannot be acquired an error is returned.

WRITE_BLOCK_LOCK

Blocking write lock. The thread will block until the lock can be acquired.

RESET_LOCK

Equivalent to calling Lock with FREE_LOCK followed by Lock with WRITE_LOCK.

SUSPEND_LOCK

Temporarily suspend locking.

RESTORE_READ_LOCK

Restore READ_LOCK mode after SUSPEND_LOCK.

RESTORE_READ_BLOCK_LOCK

Restore READ_BLOCK_LOCK mode after SUSPEND_LOCK.

RESTORE_WRITE_LOCK

Restore WRITE_LOCK mode after SUSPEND_LOCK

RESTORE_WRITE_BLOCK_LOCK

Restore WRITE_BLOCK_LOCK mode after SUSPEND_LOCK.

TOCIndex