This method is called from a different thread, so it's not subject to the visibility guarantees you get when receiving messages. Shouldn't `latch` be `@volatile`?