ReentrantLock class

Reentrant lock.

It uses Zone and maintain a list of inner locks.

Implemented types

Constructors

ReentrantLock()

Properties

hashCode int
The hash code for this object.
no setterinherited
inLock bool
for reentrant, test whether we are currently in the synchronized section. for non reentrant, it returns the locked status.
no setteroverride
innerLevel int
Inner level count.
no setter
innerLocks List<BasicLock>
We always have at least one inner lock
final
inZone bool
We are in zone as soon as we enter the first lock level.
no setter
locked bool
returns true if the lock is currently locked.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
synchronized<T>(FutureOr<T> func(), {Duration? timeout}) Future<T>
Executes computation when lock is available.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited