Another version for the ring.
Another version try.
Another ...
Working version without 'gracefully termination'.
Final version without graceful termination.