File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,11 @@ namespace rubinius {
248
248
if (!compile_request || compile_request->nil_p ()) continue ;
249
249
}
250
250
251
+ utilities::thread::Condition* cond = compile_request->waiter ();
252
+
253
+ // Don't proceed until requester has reached the wait_cond
254
+ if (cond) wait_mutex.lock ();
255
+
251
256
Context ctx (this );
252
257
jit::Compiler jit (&ctx);
253
258
@@ -272,7 +277,8 @@ namespace rubinius {
272
277
}
273
278
274
279
// If someone was waiting on this, wake them up.
275
- if (utilities::thread::Condition* cond = compile_request->waiter ()) {
280
+ if (cond) {
281
+ wait_mutex.unlock ();
276
282
cond->signal ();
277
283
}
278
284
@@ -307,7 +313,8 @@ namespace rubinius {
307
313
<< " ]]]\n " ;
308
314
}
309
315
// If someone was waiting on this, wake them up.
310
- if (utilities::thread::Condition* cond = compile_request->waiter ()) {
316
+ if (cond) {
317
+ wait_mutex.unlock ();
311
318
cond->signal ();
312
319
}
313
320
@@ -321,7 +328,8 @@ namespace rubinius {
321
328
metrics ().m .jit_metrics .methods_failed ++;
322
329
323
330
// If someone was waiting on this, wake them up.
324
- if (utilities::thread::Condition* cond = compile_request->waiter ()) {
331
+ if (cond) {
332
+ wait_mutex.unlock ();
325
333
cond->signal ();
326
334
}
327
335
current_compiler_ = 0 ;
@@ -369,7 +377,8 @@ namespace rubinius {
369
377
}
370
378
371
379
// If someone was waiting on this, wake them up.
372
- if (utilities::thread::Condition* cond = compile_request->waiter ()) {
380
+ if (cond) {
381
+ wait_mutex.unlock ();
373
382
cond->signal ();
374
383
}
375
384
You can’t perform that action at this time.
0 commit comments