pub(crate) fn reserve<E>(
opener: &str,
root: &str,
exists: impl Fn(&str) -> bool,
admit: impl FnOnce(usize) -> Result<(), E>,
) -> Result<Reservation, E>Expand description
Admit one more popup pane from opener if admit agrees, given how many
popup panes the chain it belongs to (rooted at root) has open or being
opened, and hold its slot. The count and the slot are taken under one lock.