use poll() to avoid race condition where tasks could be loss if added during iteration