We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d5892 commit fa9b467Copy full SHA for fa9b467
src/pharos.rs
@@ -255,19 +255,26 @@ impl<Event> Sink<Event> for Pharos<Event> where Event: Clone + 'static + Send
255
}
256
257
258
+ let mut pending = false;
259
+
260
261
let this = self.get_mut();
262
263
for (i, opt) in this.observers.iter_mut().enumerate()
264
{
265
if let Some( ref mut obs ) = opt
266
- let res = ready!( Pin::new( obs ).poll_flush( cx ) );
-
- if res.is_err()
267
+ match Pin::new( obs ).poll_flush( cx )
268
- this.free_slots.push( i );
269
+ Poll::Pending => pending = true ,
270
+ Poll::Ready(Ok()) => continue ,
271
- *opt = None;
272
+ Poll::Ready(Err(_)) =>
273
+ {
274
+ this.free_slots.push( i );
275
276
+ *opt = None;
277
+ }
278
279
280
0 commit comments