-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to Client/Server #165
Conversation
8985bd0
to
bc27fb4
Compare
4c28d41
to
b597fd8
Compare
b597fd8
to
e4827b8
Compare
e4827b8
to
08556fa
Compare
This is hanging in JRuby because |
This makes each connection on the server into a fiber that has its own state. In theory this should allow for easier implementation of things like `each_key` over the server.
This method returns true when the wrapper is running in server mode
This version has some threading fixes that we need.
a27b3fc
to
dc9ce9e
Compare
@asppsa that’s how the Thread.current “hash” works. Each fiber gets its own scoped storage. Instead maybe you should try thread_variable_set & thread_variable_get? See https://ruby-doc.org/core-2.4.1/Thread.html |
@brutuscat, the issue was resolved in JRuby 9.2.9.0 - jruby/jruby#5863 I think this PR actually works fine now - there's an issue with actionpack on Ruby 2.2, dropping 2.2 support will resolve that. |
Server
is rewritten to use a fiber per connection. This makes handling stateful stuff like iterating over an enumerator easier.Server
also uses_nonblock
methods to hopefully speed up IOeach_key
is implemented on the Server/ClientClient
now buffers reads if it doesn't manage to read the whole server response at once.