(&self)
| 114 | } |
| 115 | |
| 116 | pub async fn pop(&self) -> Option<InvokeRequest> { |
| 117 | let mut rx = self.rx.lock().await; |
| 118 | let result = rx.recv().await; |
| 119 | if result.is_some() { |
| 120 | self.depth.fetch_sub(1, Ordering::Relaxed); |
| 121 | } |
| 122 | result |
| 123 | } |
| 124 | |
| 125 | pub async fn push(&self, req: InvokeRequest) -> Result<(), ServerError> { |
| 126 | self.tx |