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
Everthing is fine if the code is not encapsulated inside a function:
using ZMQ
context = Context()
socket = Socket(context, PUB)
bind(socket, "tcp://*:5556")
while true
zipcode = rand(10000:99999)
temperature = rand(-80:135)
relhumidity = rand(10:60)
message = "$zipcode $temperature $relhumidity"
send(socket, message)
yield()
end
close(socket)
close(context)
I'm on Windows 11 running Julia v1.8.5 with ZMQ v1.2.2.
Any idea what I could have done wrong? It seems to me like a rather simple change that couldn't really hurt, but apparently I have been proven wrong and could have misused the API.
The text was updated successfully, but these errors were encountered:
The example publisher in the Basics section of the ZMQ Guide crashes if put in a function. See this:
Which results in:
Everthing is fine if the code is not encapsulated inside a function:
I'm on Windows 11 running Julia v1.8.5 with ZMQ v1.2.2.
Any idea what I could have done wrong? It seems to me like a rather simple change that couldn't really hurt, but apparently I have been proven wrong and could have misused the API.
The text was updated successfully, but these errors were encountered: