fn pending_next_all(&self) -> *mut Task<Fut> {
        // The `ReadyToRunQueue` stub is never inserted into the `head_all`
        // list, and its pointer value will remain valid for the lifetime of
        // this `FuturesUnordered`, so we can make use of its value here.
        Arc::as_ptr(&self.ready_to_run_queue.stub) as *mut _
    }
Returns the reserved value for `Task::next_all` to indicate a pending
assignment from the thread that inserted the task.

`FuturesUnordered::link` needs to update `Task` pointers in an order
that ensures any iterators created on other threads can correctly
traverse the entire `Task` list using the chain of `next_all` pointers.
This could be solved with a compare-exchange loop that stores the
current `head_all` in `next_all` and swaps out `head_all` with the new
`Task` pointer if the head hasn't already changed. Under heavy thread
contention, this compare-exchange loop could become costly.

An alternative is to initialize `next_all` to a reserved pending state
first, perform an atomic swap on `head_all`, and finally update
`next_all` with the old head node. Iterators will then either see the
pending state value or the correct next node pointer, and can reload
`next_all` as needed until the correct value is loaded. The number of
retries needed (if any) would be small and will always be finite, so
this should generally perform better than the compare-exchange loop.

A valid `Task` pointer in the `head_all` list is guaranteed to never be
this value, so it is safe to use as a reserved value until the correct
value can be written.
futures-util/src/stream/futures_unordered/mod.rs