graceful icon indicating copy to clipboard operation
graceful copied to clipboard

Interrupted locking mechanism

Open SimonRichardson opened this issue 7 years ago • 2 comments

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.

SimonRichardson avatar Feb 20 '18 14:02 SimonRichardson

Coverage Status

Coverage increased (+0.5%) to 67.877% when pulling a7f2b6eacf09cc068ebfdebae1456a581e2a38ba on SimonRichardson:interrupted-lock into d72b0151351a13d0421b763b88f791469c4f5dc7 on tylerb:master.

coveralls avatar Feb 20 '18 14:02 coveralls

Coverage Status

Coverage increased (+0.5%) to 67.877% when pulling 1847d63851f9bfd14cf17eb52c25b9791511b980 on SimonRichardson:interrupted-lock into d72b0151351a13d0421b763b88f791469c4f5dc7 on tylerb:master.

coveralls avatar Feb 20 '18 14:02 coveralls