distmutex update (TODO: Fix locking on last thread)