Wip client flock

other operations only block for a short time. When this multithread was enabled, I also noticed big performance improvement.