Lasso Soft Inc. > Home

[Thread_Lock]

Creates a lock that can be used to control concurrent access to a shared resource such as a global server-wide variable or a file.

A thread lock can be locked using the [Thread_Lock->Lock] tag or unlocked using the [Thread_Lock->Unlock] tag.

Once a thread lock is locked, any subsequent attempts to acquire a lock will wait until the thread is unlocked. If several pages attempt to acquire a lock simultaneously, one will end up the lock and the others will have to wait until it has released it before they can access the same resource.

Note: The use of thread tools is entirely voluntary. There is nothing in Lasso that prevents access to the same shared resource, but the diligent use of the thread tools will ensure predictable results.

  • Syntax
  • Parameters
[Global: 'myLock' = (Thread_Lock)]

[if: $myLock->(Lock: 1000)]
  ...
  [$myLock->(Unlock)]
[/If]
Examples

See the Lasso 8 Language Guide for examples of how to use this tag. This tag is documented on page 100.

Tag Link [Thread_Lock] Category Thread
Type Substitution Data Source Any
Support Preferred Version 6.0
Output Type Thread_Lock Security Tag
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft