if (cache->func.debug) cache->func.debug("deleting", ie);
#ifdef BUILD_ASYNC_PRELOAD
if (ie->flags.delete_me == 1) return;
+ LKL(ie->lock);
if (ie->preload)
{
ie->flags.delete_me = 1;
_evas_cache_image_entry_preload_remove(ie, NULL);
+ LKU(ie->lock);
return;
}
#endif
cache->func.surface_delete(ie);
#ifdef BUILD_ASYNC_PRELOAD
+ LKU(ie->lock);
+#ifndef SCALECACHE
LKD(ie->lock);
+#endif
LKD(ie->lock_cancel);
#endif
#ifdef EVAS_FRAME_QUEUING
LKI(ie->lock_references);
#endif
#ifdef BUILD_ASYNC_PRELOAD
+#ifndef SCALECACHE
LKI(ie->lock);
+#endif
LKI(ie->lock_cancel);
#endif
#endif
return;
}
+ // XXX: i smell concurrency problem here
#ifdef BUILD_ASYNC_PRELOAD
EINA_LIST_FREE(cache->preload, im)
{
+ LKL(im->lock);
/* By doing that we are protecting us from destroying image when the cache is no longuer available. */
im->flags.delete_me = 1;
_evas_cache_image_entry_preload_remove(im, NULL);
+ LKU(im->lock);
}
evas_async_events_process();
#endif