Command: UNLOCK

Purpose: Releases a lock on the specified array reference that was previously established using the LOCK command. Once unlocked, another client can lock the reference.

All locks that are established by a client are automatically released when the M/Wire session is terminated by QUIT, EXIT or HALT, or if the M/Wire client closes the socket.

Unlocking an array reference that was not locked has no effect and does not return an error.

Arguments:

Argument No Description
1 The array node to be unlocked. This takes the format:
   arrayRef[subscr1,subscr2,..etc]
You may specify no subscripts at all, in which case the top-level node is unlocked,eg:
   arrayRef
Unlocking the first level of subscripting would look like:
   arrayRef[1]
Unlocking the second level of subscripting would look like:
   arrayRef[1,"aaa"]

Note that subscripts can be numeric or text. Text subscripts must be wrapped in double quote (") characters. Quoting of numeric subscripts is optional.

Response

Single-line response

Server: +OK

Example

Successful:

Client: UNLOCK test1["a","b"]
Server: +OK

For those familiar with the native language of GT.M and Caché systems, the second example is the equivalent of:

lock -^test1("a","b")