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
I am not sure if I am using it wrong, but using default httpz config, blocking_mode is true, after receiving websocket.Conn when I try to write to it from a different thread, it blocks that thread and never properly writes it meaning the Client never receives the message, did a litttle investigation call to std.posix.writev hangs, so I think I am using it the wrong way? Window's WriteFile API doesn't support different thread "write"(s)? or it's the Zig's standard library at fault? Any suggestions would be helpful.
The text was updated successfully, but these errors were encountered:
If I'm being honest, these window issues have been my bane. See karlseguin/websocket.zig#46 for another example. For one, I have no means of reproducing them.
It doesn't sound like you're doing anything wrong. And I'm unsure if my libraries are wrong, or if Zig's windows abstractions are wrong.
I find the windows documentation frustrating - I don't see it mention anything about thread-safety, although non-official sources seem to indicate that it is thread-safe. Anyways, *websocket.Conn.write itself uses a mutex to ensure a single thread writes at any given time.
The best thing to do is to strip out httpz and websocket.zig and see if the problem can be reproduced using Zig's standard library - as we did with the linked issue above.
I am not sure if I am using it wrong, but using default
httpz
config,blocking_mode
is true, after receivingwebsocket.Conn
when I try to write to it from a different thread, it blocks that thread and never properly writes it meaning the Client never receives the message, did a litttle investigation call tostd.posix.writev
hangs, so I think I am using it the wrong way? Window'sWriteFile
API doesn't support different thread "write"(s)? or it's the Zig's standard library at fault? Any suggestions would be helpful.The text was updated successfully, but these errors were encountered: