Closed AgustinCB closed 6 years ago
Node has now a functionality to start listening for messages from other nodes in the network asking from its current status.
Node
In order to this, it was necessary to make Node thread safe.
There're three structures that can be modified by more than one thread at the same time right now:
This PR wraps them into Mutex to make sure that they're safe to share. Now one can safely wrap Node in Arc and share it between threads.
Mutex
Arc
Closes #5
Node
has now a functionality to start listening for messages from other nodes in the network asking from its current status.In order to this, it was necessary to make
Node
thread safe.There're three structures that can be modified by more than one thread at the same time right now:
This PR wraps them into
Mutex
to make sure that they're safe to share. Now one can safely wrapNode
inArc
and share it between threads.Closes #5