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
It'd be nice if concurrent readers worked the same way concurrent writers do.
i.e right now if I wanted to spawn a pool of goroutines to read messages from a WebSocket and respond to them, I'd need to spawn an extra goroutine to read the messages and then pipe them to the workers via a channel. It'd be simpler if the library just automatically blocked additional Reader calls until previous readers were closed.
The text was updated successfully, but these errors were encountered:
Looks like the reason I never allowed this is because you want to set a timeout between every message, not a timeout on a single worker waiting for a message. Fixed the NetConn bug though.
It'd be nice if concurrent readers worked the same way concurrent writers do.
i.e right now if I wanted to spawn a pool of goroutines to read messages from a WebSocket and respond to them, I'd need to spawn an extra goroutine to read the messages and then pipe them to the workers via a channel. It'd be simpler if the library just automatically blocked additional Reader calls until previous readers were closed.
The text was updated successfully, but these errors were encountered: