1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Lock the entire active_units loop

The previous fix seems not working. Let me test if this works.
This commit is contained in:
Takashi Kokubun 2020-12-07 15:33:29 -08:00
parent 41fafd9dd2
commit 5c2ff88be2
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -938,7 +938,6 @@ compile_compact_jit_code(char* c_file)
bool success = true;
CRITICAL_SECTION_START(3, "before active_units list_for_each");
list_for_each(&active_units.head, child_unit, unode) {
CRITICAL_SECTION_FINISH(3, "after active_units list_for_each");
char funcname[MAXPATHLEN];
sprint_funcname(funcname, child_unit);
@ -952,8 +951,6 @@ compile_compact_jit_code(char* c_file)
if (!iseq_label) iseq_label = sep = "";
fprintf(f, "\n/* %s%s%s:%ld */\n", iseq_label, sep, iseq_path, iseq_lineno);
success &= mjit_compile(f, child_unit->iseq, funcname, child_unit->id);
CRITICAL_SECTION_START(3, "before active_units list_for_each");
}
CRITICAL_SECTION_FINISH(3, "after active_units list_for_each");