refactor 'latch' to 'closeLatch'