It seems that mutex can work, too.