acquire lock when updating panel.