Originally Posted by
brewbuck
I can imagine a few cases where it could help. In a single thread, the sentinel is not necessary, because you can always tell when you've done a full cycle by checking to see if you come back to the same spot.
But in multithreaded code, you might have one thread cycling through the list while another thread is manipulating it. If the manipulating thread happens to delete the element the cycling thread began at, the cycling thread will get stuck in an infinite loop, thinking it has never come full circle. In that case, you can check for the sentinel to know that you've come to the end.