Add note on simultanous execution of the protocol

This commit is contained in:
Franck Royer 2021-01-19 12:15:29 +11:00
parent a8fe340a02
commit 1429cd7802
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

View File

@ -322,6 +322,9 @@ where
}
}
/// A behaviour that can execute await/.async protocols.
///
/// Note: It is not possible to execute the same protocol with the same peer several simultaneous times.
pub struct Behaviour<I, O, E> {
protocol_in_events: VecDeque<(PeerId, ProtocolInEvent<I, O, E>)>,
protocol_out_events: VecDeque<(PeerId, ProtocolOutEvent<I, O, E>)>,