Avoid needlessly calling evthread_notify_base() when the loop is not running Also make sure that we always hold the base lock when calling evthread_notify_base.