Improving code by extracting common code to separate branch.
Depends on D7186
yarn flow check
make array read only
What do you think about having early exit? We can also consider extracting write operations to a separate function that only accepts workerWriteRequests
early exit