#13 - Made isClosed variable volatile