Open
Description
Summary
Data locks seem too complex to implement safe algorithms.
Even more, they are not very successful to achieve enough performance.
Though we don't want to introduce GIL, having a thread lock for sequence data operation will make many things simpler.
Detailed Explanation
Each vm needs to have unique vm id.
When trying lock, lock need to save reentrance count and vm id.
trying to locking from different vm will be locked.
trying to locking form same vm will be allowed with increasing reentrance count.
when unlock, reentrance count decreases.
when count reaches 0, lock is invalidated.