This function is significantly more efficient in comparison to the current strategy used for polling waitable handles.