use volatile on lock