File tree Expand file tree Collapse file tree
src/tools/miri/src/concurrency Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ impl BlockingIoManager {
9898 } )
9999 . collect :: < Vec < _ > > ( ) ;
100100
101+ // Deregister all ready sources as we only want to receive one event per receiver.
102+ ready. iter ( ) . for_each ( |( receiver, source) | self . deregister ( source. id ( ) , * receiver) ) ;
103+
101104 Ok ( ready)
102105 }
103106
Original file line number Diff line number Diff line change @@ -823,12 +823,10 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
823823 Err ( e) => panic ! ( "unexpected error while polling: {e}" ) ,
824824 } ;
825825
826- ready. into_iter ( ) . try_for_each ( |( receiver, source ) | {
826+ ready. into_iter ( ) . try_for_each ( |( receiver, _source ) | {
827827 match receiver {
828- InterestReceiver :: UnblockThread ( thread_id) => {
829- this. machine . blocking_io . deregister ( source. id ( ) , receiver) ;
830- this. unblock_thread ( thread_id, BlockReason :: IO )
831- }
828+ InterestReceiver :: UnblockThread ( thread_id) =>
829+ this. unblock_thread ( thread_id, BlockReason :: IO ) ,
832830 }
833831 } )
834832 }
You can’t perform that action at this time.
0 commit comments