isBusy property

bool get isBusy

Test-only: returns true if the lock is currently held or contended.

Implementation

bool get isBusy =>
    _writer ||
    _readers > 0 ||
    _readWaiters.isNotEmpty ||
    _writeWaiters.isNotEmpty;