• Home
  • Raw
  • Download

Lines Matching full:queue

141 /// A queue where decoding jobs wait until they are completed, at which point they can be
144 /// Queue of all the frames waiting to be sent to the client.
145 queue: VecDeque<T>, field
147 /// EventFd signaling `EPOLLIN` whenever the queue is not empty.
159 Ok(Self { queue: Default::default(), poll_fd }) in new()
162 /// Push `handle` to the back of the queue.
164 self.queue.push_back(handle); in push()
166 log::error!("failed to write ready frames queue poll FD: {:#}", e); in push()
171 /// queue.
179 let len_before = self.queue.len(); in extend()
180 self.queue.extend(iter); in extend()
181 if let Err(e) = self.poll_fd.write((self.queue.len() - len_before) as u64) { in extend()
182 log::error!("failed to write ready frames queue poll FD: {:#}", e); in extend()
194 let next = self.queue.pop_front(); in next()
196 if next.is_some() && self.queue.is_empty() { in next()
198 log::error!("failed to read ready frames queue poll FD: {:#}", e); in next()
218 let mut queue = ReadyFramesQueue::<()>::new().unwrap(); in test_ready_frame_queue_poll() localVariable
220 epoll.add(queue.poll_fd(), EpollEvent::new(EpollFlags::EPOLLIN, 1)).unwrap(); in test_ready_frame_queue_poll()
222 // Empty queue should not signal. in test_ready_frame_queue_poll()
227 // Events in the queue should signal. in test_ready_frame_queue_poll()
228 queue.push(()); in test_ready_frame_queue_poll()
234 // The queue is empty again and should not signal. in test_ready_frame_queue_poll()
235 queue.next().unwrap(); in test_ready_frame_queue_poll()
241 // Add 3 elements to the queue, it should signal until we remove them all. in test_ready_frame_queue_poll()
242 queue.extend(std::iter::repeat(()).take(3)); in test_ready_frame_queue_poll()
248 queue.next().unwrap(); in test_ready_frame_queue_poll()
254 queue.next().unwrap(); in test_ready_frame_queue_poll()
260 queue.next().unwrap(); in test_ready_frame_queue_poll()