Question
· Nov 11

LOCK on Global vars, is it necessary in this case?

I have a business process that adds data to a global variable on receipt of an HL7 message, and a scheduled task that executes a class method defined within the same business process that removes data from the same global variable. With this in mind it makes sense to consider concurrency and therefore make use of the LOCK command.

My first question is whether this is actually necessary?

My second question is what happens to locks when an error/exception is encountered after a lock but before the code to release the lock, is this managed automatically or should try-catch be used to release the lock given an error?

Product version: HealthShare 2017.2
$ZV: Cache for Windows (x86-64) 2017.2 (Build 744U) Fri Sep 29 2017 10:58:27 EDT
Discussion (1)1
Log in or sign up to continue