aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2017-06-13 14:26:45 +0200
committerJohn Högberg <[email protected]>2017-06-14 08:21:18 +0200
commite2915bedad8579cb4f2e52db01bc7adc1477ba69 (patch)
tree1be64dd6ba24e7c420a5d978eca9707d968d0596
parent698068c2322d6032f46487f56802246198e576f2 (diff)
downloadotp-e2915bedad8579cb4f2e52db01bc7adc1477ba69.tar.gz
otp-e2915bedad8579cb4f2e52db01bc7adc1477ba69.tar.bz2
otp-e2915bedad8579cb4f2e52db01bc7adc1477ba69.zip
Assert that enqueue_later_op must not run on a dirty scheduler.
You're not supposed to do this, but it behaved correctly even with a debug build aside from degraded performance (The scheduler started to busy-wait for new operations rather than sleep).
-rw-r--r--erts/emulator/beam/erl_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index fc2b34e70f..2a988b9d2d 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -2371,7 +2371,7 @@ enqueue_later_op(ErtsSchedulerData *esdp,
ErtsThrPrgrLaterOp *lop)
{
ErtsThrPrgrVal later = erts_thr_progress_later(esdp);
- ASSERT(esdp);
+ ASSERT(esdp && !ERTS_SCHEDULER_IS_DIRTY(esdp));
lop->func = later_func;
lop->data = later_data;