エンティティのロックは,参照カウントをインクリメントする操作なので,entity.unlock()
の呼び出し回数はentity.lock()
のそれと対応していなければなりません。
in order to actually unlock your entity you must call unlock() as many times as you called lock() in the same process 4D Forums
この点を明確にする説明がドキュメントに加えられました。