pub(crate) fn pop_ready_requests(
        &mut self,
        event_kind: EventKind,
        path: &AbsoluteSystemPath,
    ) -> Option<Vec<T>> {
        if !matches!(event_kind, EventKind::Create(_)) {
            return None;
        }
        if let Some(serial) = serial_for_path(&self.cookie_root, path) {
            self.latest = serial;
            let mut ready_requests = Vec::new();
            while let Some(cookied_request) = self.pending_requests.pop() {
                if cookied_request.serial <= serial {
                    ready_requests.push(cookied_request.request);
                } else {
                    self.pending_requests.push(cookied_request);
                    break;
                }
            }
            Some(ready_requests)
        } else {
            None
        }
    }
If this is a cookie file, pop all requests that are ready to be handled.
The returned vector might be empty if this was a cookie file but we
don't have any requests that are ready to be handled. None is
returned if this is not a cookie file being created.
crates/turborepo-filewatch/src/cookies.rs