isLocked property

bool get isLocked

Whether a critical section is running or waiting to run.

Implementation

bool get isLocked => _pending > 0;