Lasso Soft Inc. > Home

[Thread_RWLock->ReadLock]

Acquires a read lock on a read/write lock with an optional timeout. Returns true if the read lock could be established. Returns false if the read lock could not be established or if the timeout value is reached.

A read/write lock allows many concurrent read accesses. However, if a write lock is requested it must wait until all current read accesses have been released before it is granted. Once a write lock is granted no read or write access will be granted until it is released.

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_RWLock)]

[if: $myLock->(ReadLock: 1000)]
  ...
  [$myLock->(ReadUnlock)]
[/If]
Optional Parameters
Timeout The number of milliseconds which the tag should wait to acquire the lock. If this timeout value is reached, False is returned. Default is to wait forever.
Examples

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

Tag Link [Thread_RWLock->ReadLock] Category Technical
Type Member Data Source Any
Support Preferred Version 6.0
Output Type Boolean Security Tag
Implementation LDML Sets 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