add lock

Signed-off-by: Simon <zzyy.alex@gmail.com>