SimGrid  3.14.159
Versatile Simulation of Distributed Systems

Find the S4U example fitting your needs in the archive.

Basics of SimGrid simulation

Inter-Actor Synchronization