add lock option

The option for preventing two or more events of thread option use was added.