Exchanger

The Exchanger class represents a kind of rendezvous point where two threads can exchange objects. Each thread presents some object on entry…