condition_variable for the polling thread