I would have done

```
void notifyStarted()
{
      atomic_inc(&numrunning);
}
```

and get rid of markStarted

and probably also in notifyStopped:
```
        PooledThreadHandle myid = item->markStopped();
        if (myid)
           atomic_dec(&numrunning);
```