graceful
graceful copied to clipboard
Interrupted locking mechanism
The following commit introduces a lock around the Interrupted state. Introduction of the lock helps prevent race conditions where accessing internal state at the same time as the Server.handleInterrupt.
Ideally I would prefer to handle the lock outside of this, but because an internal state is made public via the struct and we have logic that depends on that, we're a bit limited on how to fix this.
Coverage increased (+0.5%) to 67.877% when pulling a7f2b6eacf09cc068ebfdebae1456a581e2a38ba on SimonRichardson:interrupted-lock into d72b0151351a13d0421b763b88f791469c4f5dc7 on tylerb:master.