lock needed for thread notification.