I’m actually setting up a simple p2p network on virtual machines to test the PARSEC.
I need two main threads, one that has an infinite send loop and one with an infinite receive loop. The send loop takes peers at random and send create_gossip, then waits for the response.
The other thread waits for requests and sends response…
Are there example implementations somewhere? The integration test run everything in the same thread as far as I know.
Do these threads need to block each other?
If they don’t block, it might happen that two peers connect to each other in both loops at the same time. … This might give racing conditions