I am trying to understand which are the reasons (all of them) why a task stealing operation could fail in TBB. From what I manage to understand so far, the receive_or_steal_task method of the custom_scheduler class is where "the magic happens". In this method, there is an infinite loop that breaks for several reasons:
Am I correct about all the above? Are there any other reasons why the stealing operation could fail? Can anyone give some details about the completion_ref_count == 1 situation?