@@ -445,10 +445,13 @@ impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
445
445
446
446
/// Set an active thread and return the id of the thread that was active before.
447
447
fn set_active_thread_id ( & mut self , id : ThreadId ) -> ThreadId {
448
- let active_thread_id = self . active_thread ;
449
- self . active_thread = id;
450
- assert ! ( self . active_thread. index( ) < self . threads. len( ) ) ;
451
- active_thread_id
448
+ assert ! ( id. index( ) < self . threads. len( ) ) ;
449
+ info ! (
450
+ "---------- Now executing on thread `{}` (previous: `{}`) ----------------------------------------" ,
451
+ self . get_thread_display_name( id) ,
452
+ self . get_thread_display_name( self . active_thread)
453
+ ) ;
454
+ std:: mem:: replace ( & mut self . active_thread , id)
452
455
}
453
456
454
457
/// Get the id of the currently active thread.
@@ -735,6 +738,11 @@ impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
735
738
for ( id, thread) in threads {
736
739
debug_assert_ne ! ( self . active_thread, id) ;
737
740
if thread. state == ThreadState :: Enabled {
741
+ info ! (
742
+ "---------- Now executing on thread `{}` (previous: `{}`) ----------------------------------------" ,
743
+ self . get_thread_display_name( id) ,
744
+ self . get_thread_display_name( self . active_thread)
745
+ ) ;
738
746
self . active_thread = id;
739
747
break ;
740
748
}
0 commit comments