LOCK@

Platform

x64, Win32

Purpose

To protect memory shared by different threads.

Syntax

SUBROUTINE LOCK@(LOCK_ID)
INTEGER LOCK_ID

Description

Memory that is shared by different threads can be protected by calling LOCK@ (before) and UNLOCK@ (after) accessing the memory. LOCK@ and UNLOCK@ can also be used before and after calls to routines that access "static" variables in order to make them locally thread-safe. When LOCK@ is called and the same LOCK_ID is already active on another thread then LOCK@ waits for the corresponding UNLOCK@ on the other thread. Each LOCK_ID is assigned by the user and is to be uniquely associated with a particular grouping of variables.

See also

START_THREAD@, WAIT_FOR_THREAD@, UNLOCK@.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited