Skip to content

Commit c12c2a5

Browse files
committed
Revert "Make sure unmuted actors can't run on two schedulers concurrently"
This reverts commit dbfbd9a. Reverting this because it's an incomplete fix and a proper fix will require larger changes. Will revisit later.
1 parent dbfbd9a commit c12c2a5

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/libponyrt/sched/scheduler.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,23 +1488,10 @@ bool ponyint_sched_unmute_senders(pony_ctx_t* ctx, pony_actor_t* actor)
14881488
{
14891489
needs_unmuting = ponyint_actorstack_pop(needs_unmuting, &to_unmute);
14901490

1491-
// check if the actor has any messages waiting to be processed
1492-
// note: this must be done before the actor is unmuted to
1493-
// avoid a race condition
1494-
bool should_reschedule = !ponyint_messageq_isempty(&to_unmute->q);
1495-
1496-
// unmute actor
14971491
ponyint_unmute_actor(to_unmute);
1498-
1499-
// only reschedule if the actor had messages waiting to be processed
1500-
// before we unnmuted it to ensure it cannot be concurrently
1501-
// scheduled on multiple scheduler threads
1502-
if(should_reschedule)
1503-
{
1504-
ponyint_sched_add(ctx, to_unmute);
1505-
DTRACE2(ACTOR_SCHEDULED, (uintptr_t)sched, (uintptr_t)to_unmute);
1506-
actors_rescheduled++;
1507-
}
1492+
ponyint_sched_add(ctx, to_unmute);
1493+
DTRACE2(ACTOR_SCHEDULED, (uintptr_t)sched, (uintptr_t)to_unmute);
1494+
actors_rescheduled++;
15081495

15091496
ponyint_sched_start_global_unmute(ctx->scheduler->index, to_unmute);
15101497
}

0 commit comments

Comments
 (0)