If I'm not mistaken there is a race condition here (as well as in the method above). layer_consumers_ can only be safely used from within the executor_ thread