mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-08 17:05:43 +00:00
fix artifact cache replaced-value deletion - this CAN NOT run if the new value == the old value
This commit is contained in:
@@ -422,12 +422,13 @@ ac_async_tick(void)
|
||||
{
|
||||
if(str8_match(n->key, r->key, 0))
|
||||
{
|
||||
// rjf: eliminate existing values, if nay
|
||||
if(cache->destroy && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;)
|
||||
// rjf: eliminate existing values, if any, if they do not match the current
|
||||
if(!MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;)
|
||||
{
|
||||
if(access_pt_is_expired(&n->access_pt, .time = 0, .update_idxs = 0))
|
||||
{
|
||||
cache->destroy(n->val);
|
||||
MemoryZeroStruct(&n->val);
|
||||
break;
|
||||
}
|
||||
cond_var_wait_rw(stripe->cv, stripe->rw_mutex, 1, max_U64);
|
||||
@@ -543,12 +544,13 @@ ac_async_tick(void)
|
||||
{
|
||||
if(str8_match(n->key, r->key, 0))
|
||||
{
|
||||
// rjf: eliminate existing values, if nay
|
||||
if(cache->destroy && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;)
|
||||
// rjf: eliminate existing values, if any, if they do not match the current
|
||||
if(!MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;)
|
||||
{
|
||||
if(access_pt_is_expired(&n->access_pt, .time = 0, .update_idxs = 0))
|
||||
{
|
||||
cache->destroy(n->val);
|
||||
MemoryZeroStruct(&n->val);
|
||||
break;
|
||||
}
|
||||
cond_var_wait_rw(stripe->cv, stripe->rw_mutex, 1, max_U64);
|
||||
|
||||
Reference in New Issue
Block a user