Thanks Andy!
Is run_id built on the method of generation lock proposed by the NV-Heaps that provides concurrent accesses to an object?
Since I saw Marcin said that "currently it's not possible for pmemobj_open() on the same file", I thought run_id prevents concurrent access to the same object.
But now I doubt that after analyzing the _get_lock() function.
_get_lock(uint64_t pop_runid, volatile uint64_t *runid, void *lock,
int (*init_lock)(void *lock, void *arg), size_t size)
Because I found that even though runid doesn't equal to pop_runid, _get_lock tends to return a lock successfully, unless it fails to initiate the lock.
Does that mean the object could be accessed by different processes/thread concurrently?
在 2017年2月24日星期五 UTC+8下午10:25:57,Andy Rudoff写道: