frost.threads

Class ScopedLock

    └ Immutable
         └ Object

An object which holds onto a Lock as long as the ScopedLock itself continues to exist. ScopedLock is typically assigned to a local variable, which will cause it to remain in memory until the local variable goes out of scope. For example:

method process() {
    def scope := ScopedLock(lock)
    ...
    -- lock is automatically released at this point
}
Source Code:
View Source

Initializer Summary

init(lock:Lock)
Inherited Fields:

Initializers

init (lock:Lock)
Parameters:
lock - value of type Lock