isWorker property

bool get isWorker

Whether this is a spawned worker rather than the parent.

Derived from index rather than stored, so the two cannot disagree.

Implementation

bool get isWorker => index > 0;