Skip to content

Commit bc49b80

Browse files
committed
do not retry artifact computation if cancelled
1 parent e9e0036 commit bc49b80

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/artifact_cache/artifact_cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ ac_async_tick(void)
376376
AC_Artifact val = r->create(r->key, r->cancel_signal, &retry, &gen);
377377

378378
// rjf: retry? -> resubmit request
379-
if(retry && lane_idx() == 0)
379+
if(retry && lane_idx() == 0 && !ins_atomic_u32_eval(r->cancel_signal))
380380
{
381381
AC_RequestBatch *batch = &ac_shared->req_batches[task_idx];
382382
MutexScope(batch->mutex)
@@ -485,7 +485,7 @@ ac_async_tick(void)
485485
lane_ctx(lane_ctx_restore);
486486

487487
// rjf: retry? -> resubmit request
488-
if(retry)
488+
if(retry && !ins_atomic_u32_eval(r->cancel_signal))
489489
{
490490
AC_RequestBatch *batch = &ac_shared->req_batches[task_idx];
491491
MutexScope(batch->mutex)

src/text/text.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ txt_token_array_from_lang_kind_string(Arena *arena, TXT_LangKind lang_kind, Stri
307307
ender_found = 1;
308308
}
309309
else if(active_rule != nil_rule &&
310-
str8_match(string_1byte, active_rule->close_string, 0) ||
311-
str8_match(string_2byte, active_rule->close_string, 0))
310+
(str8_match(string_1byte, active_rule->close_string, 0) ||
311+
str8_match(string_2byte, active_rule->close_string, 0)))
312312
{
313313
ender_found = 1;
314314
ender_pad = active_rule->close_advance;

0 commit comments

Comments
 (0)