Am Donnerstag, 15. November 2018 23:25:01 UTC+1 schrieb Jesse Glick:
>> Do you have some background thread writing to `infoMessages` perhaps?
Trying wrapping all field accessors in `Collections.immutableList` and
you will find out fast!
> When is CpsThreadGroup.saveProgram called?
At various times, though always within the CPS VM thread.
> During execution of SynchronousNonBlockingStepExecution.run() ?
Not from that thread.
> Should members of a SynchronousNonBlockingStepExecution be constant?
They need not be; if you need to mutate anything, use
https://javadoc.jenkins.io/plugin/workflow-step-api/org/jenkinsci/plugins/workflow/steps/StepContext.html#saveState--
But you do need to consider that the CPS VM thread may be _reading_
that state, so you may consider replacing `ArrayList` with
`CopyOnWriteList` for example.