diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2021-06-10 00:32:15 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2021-06-10 00:32:24 -0700 |
commit | c5e8a49bdeadd8e424274c17c0d2a9ffed64417b (patch) | |
tree | f8f95bac341505213430cd2b61a846dc7cee089f /mjit.h | |
parent | 791d7d49476e6363c1bd24af637a9581acc627bb (diff) |
Avoid enqueueing the same ISeq twice
by a race condition by multiple Ractors.
Atmically incrementing body->total_calls may have its own cost, so for
now we intentionally leave the unreliable total_calls. So we allow an
ISeq to be never pushed when you use multiple Ractors. However, if you
enqueue a single ccan node twice, get_from_list loops infinitely. Thus
this patch takes care of such a situation.
Diffstat (limited to 'mjit.h')
-rw-r--r-- | mjit.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -20,7 +20,7 @@ // Special address values of a function generated from the // corresponding iseq by MJIT: enum rb_mjit_iseq_func { - // ISEQ was not queued yet for the machine code generation + // ISEQ has never been enqueued to unit_queue yet NOT_ADDED_JIT_ISEQ_FUNC = 0, // ISEQ is already queued for the machine code generation but the // code is not ready yet for the execution |