fixed race condition in anscheduler_thread_poll()
*really* fixed that race condition (i hope)