Tag Link | [Thread_Lock] | Category | Threads |
---|---|---|---|
Type | Substitution | Source Available | No |
Support | Preferred | Version | 6.0 |
Change | Unchanged | Data Source | Any |
Output Type | Thread_Lock | Security | Tag |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0 |
Creates a lock that can be used to control concurrent access to a shared resource such as a global server
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.
[Global: 'myLock' = (Thread_Lock)]
[if: $myLock->(Lock: 1000)]
...
[$myLock->(Unlock)]
[/If]
No Parameters Required.
See the Lasso 8 Language Guide for examples of how to use this tag.