You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being in the port and not associated to a message, the envelope has a few issues.
It is not clear which envelope is received when you call getEnvelope() if meanwhile the port received some other message. Is it the last one or the one associated to the last read?
Is there a difference between Port and BufferedPort?
What about if we are using a callback?
What happens if a carrier modifier does not accept one message? Apparently the envelope is accepted anyway.
When 2 senders are connected to the same port, I suspect that there could be a race condition, and the envelope from one sender can be associated to the wrong message. For example
Console 1
> yarp read /r envelope
# yarp: Port /r active at tcp://192.168.99.1:10005
Console 2
> telnet 192.168.99.1 10005
# Trying 192.168.99.1...
# Connected to 192.168.99.1.
# Escape character is '^]'.
CONNECT /w1
# Welcome /w1
do envelope from w1
Console 1
# <nothing happens yet>
Console 3
> telnet 192.168.99.1 10005
# Trying 192.168.99.1...
# Connected to 192.168.99.1.
# Escape character is '^]'.
CONNECT /w2
# Welcome /w2
do envelope from w2
Console 1
# <nothing happens yet>
Console 2
message from w1
Console 1 --- RACE CONDITION
# envelope from w2 message from w1
Console 3
message from w2
Console 1 --- OK
# envelope from w2 message from w2
When a port receives some messages with the envelope and some without the envelope, the last received envelope will be associated to the messages without the envelope
Console 1
> yarp read /r envelope
# yarp: Port /r active at tcp://192.168.99.1:10005
Console 2
> telnet 192.168.99.1 10005
# Trying 192.168.99.1...
# Connected to 192.168.99.1.
# Escape character is '^]'.
CONNECT /w1
# Welcome /w1
do envelope1
message1
This discussion was converted from issue #533 on December 22, 2020 09:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Being in the port and not associated to a message, the envelope has a few issues.
getEnvelope()
if meanwhile the port received some other message. Is it the last one or the one associated to the last read?Port
andBufferedPort
?Console 1
Console 2
Console 1
Console 3
Console 1
Console 2
Console 1 --- RACE CONDITION
Console 3
Console 1 --- OK
Console 1
Console 2
Console 1 --- OK
Console 2
Console 1 --- Envelope from the wrong message
Beta Was this translation helpful? Give feedback.
All reactions