Merge pull request #181 from lovell/prevent-opcache-race-7.40
Allow op-cache winner in non-critical race condition
This commit is contained in:
commit
ec3366257f
|
@ -599,12 +599,12 @@ vips_cache_ref( VipsOperation *operation )
|
|||
static void
|
||||
vips_cache_insert( VipsOperation *operation )
|
||||
{
|
||||
VipsOperationCacheEntry *entry = g_new( VipsOperationCacheEntry, 1 );
|
||||
|
||||
/* It must not be in cache.
|
||||
*/
|
||||
g_assert( !g_hash_table_lookup( vips_cache_table, operation ) );
|
||||
if( g_hash_table_lookup( vips_cache_table, operation ) )
|
||||
return;
|
||||
|
||||
VipsOperationCacheEntry *entry = g_new( VipsOperationCacheEntry, 1 );
|
||||
entry->operation = operation;
|
||||
entry->time = 0;
|
||||
entry->invalidate_id = 0;
|
||||
|
|
Loading…
Reference in New Issue