

def _prepare_lock(self):
    " Replaces the trajectory's service with a LockWrapper "
    if (self._lock is None):
        if self._use_manager:
            if (self._manager is None):
                self._manager = multip.Manager()
            self._lock = self._manager.Lock()
        else:
            self._lock = multip.Lock()
    lock_wrapper = LockWrapper(self._storage_service, self._lock)
    self._traj.v_storage_service = lock_wrapper
    self._lock_wrapper = lock_wrapper

dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py MultiprocContext._prepare_lock/original