From: Eric Wong <e@80x24.org>
To: Claudio Poli <masterkain@gmail.com>
Cc: rainbows-public@bogomips.org
Subject: Re: undefined method `process_loop' for #<Unicorn::TCPClient:fd 14>
Date: Sun, 2 Apr 2017 00:26:15 +0000 [thread overview]
Message-ID: <20170402002615.GA32751@starla> (raw)
In-Reply-To: <9267B33C-D13C-47E1-8892-4777B96DDCD1@gmail.com>
Claudio Poli <masterkain@gmail.com> wrote:
> hello,
> I’m using Rainbows! 5.1.0 and I did a bundle update, unicorn got upgraded from 5.2.0 to 5.3.0 and I’m getting this:
>
Oops! I totally forget about this project, again. Thanks for
the report. Can you give the following a try? Should be
compatible with all unicorn 5.1+.
(It'll take me a while to test on my Centrino laptop)
diff --git a/lib/rainbows/coolio/server.rb b/lib/rainbows/coolio/server.rb
index 0d8af8c..a24d65e 100644
--- a/lib/rainbows/coolio/server.rb
+++ b/lib/rainbows/coolio/server.rb
@@ -6,6 +6,6 @@ class Rainbows::Coolio::Server < Coolio::IO
def on_readable
return if CONN.size >= MAX
- io = @_io.kgio_tryaccept and CL.new(io).attach(LOOP)
+ io = @_io.kgio_tryaccept(Rainbows::Client) and CL.new(io).attach(LOOP)
end
end
diff --git a/lib/rainbows/epoll/server.rb b/lib/rainbows/epoll/server.rb
index ab5a49f..daa6df3 100644
--- a/lib/rainbows/epoll/server.rb
+++ b/lib/rainbows/epoll/server.rb
@@ -23,7 +23,7 @@ def self.extended(sock)
def epoll_run
return EP.delete(self) if @@nr >= MAX
- while io = kgio_tryaccept
+ while io = kgio_tryaccept(Rainbows::Client)
@@nr += 1
# there's a chance the client never even sees epoll for simple apps
io.epoll_once
diff --git a/lib/rainbows/fiber/coolio/server.rb b/lib/rainbows/fiber/coolio/server.rb
index 3d8d85e..51c4054 100644
--- a/lib/rainbows/fiber/coolio/server.rb
+++ b/lib/rainbows/fiber/coolio/server.rb
@@ -17,7 +17,7 @@ def close
def on_readable
return if Rainbows.cur >= MAX
- c = @io.kgio_tryaccept and Fiber.new { process(c) }.resume
+ c = @io.kgio_tryaccept(Rainbows::Client) and Fiber.new { process(c) }.resume
end
def process(io)
diff --git a/lib/rainbows/fiber_spawn.rb b/lib/rainbows/fiber_spawn.rb
index 2c6d13d..3f0ec4a 100644
--- a/lib/rainbows/fiber_spawn.rb
+++ b/lib/rainbows/fiber_spawn.rb
@@ -23,7 +23,7 @@ def worker_loop(worker) # :nodoc:
begin
schedule do |l|
break if Rainbows.cur >= limit
- io = l.kgio_tryaccept or next
+ io = l.kgio_tryaccept(Rainbows::Client) or next
Fiber.new { process(io) }.resume
end
rescue => e
diff --git a/lib/rainbows/thread_pool.rb b/lib/rainbows/thread_pool.rb
index 63d57cb..04305ed 100644
--- a/lib/rainbows/thread_pool.rb
+++ b/lib/rainbows/thread_pool.rb
@@ -38,7 +38,7 @@ def worker_loop(worker) # :nodoc:
def sync_worker # :nodoc:
s = LISTENERS[0]
begin
- c = s.kgio_accept and c.process_loop
+ c = s.kgio_accept(Rainbows::Client) and c.process_loop
rescue => e
Rainbows::Error.listen_loop(e)
end while Rainbows.alive
@@ -52,7 +52,7 @@ def async_worker # :nodoc:
# problem. On the other hand, a thundering herd may not
# even incur as much overhead as an extra Mutex#synchronize
ret = select(LISTENERS) and ret[0].each do |s|
- s = s.kgio_tryaccept and s.process_loop
+ s = s.kgio_tryaccept(Rainbows::Client) and s.process_loop
end
rescue Errno::EINTR
rescue => e
diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb
index b304688..8ea75bf 100644
--- a/lib/rainbows/thread_spawn.rb
+++ b/lib/rainbows/thread_spawn.rb
@@ -29,7 +29,7 @@ def accept_loop(klass) #:nodoc:
begin
if lock.synchronize { nr >= limit }
worker_yield
- elsif client = l.kgio_accept
+ elsif client = l.kgio_accept(Rainbows::Client)
klass.new(client) do |c|
begin
lock.synchronize { nr += 1 }
next prev parent reply other threads:[~2017-04-02 0:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-02 0:05 undefined method `process_loop' for #<Unicorn::TCPClient:fd 14> Claudio Poli
2017-04-02 0:26 ` Eric Wong [this message]
2017-04-02 0:32 ` Eric Wong
2017-04-02 23:21 ` Claudio Poli
[not found] ` <CANp6QoJXRbPLqmOPpG7XmZBc+oYqLWCcq1ipvOyNEQPXDEwx9Q@mail.gmail.com>
2018-01-19 17:07 ` Eric Wong
[not found] ` <B05FC728-A46F-4056-997D-0BEE64A9A110@gmail.com>
2018-01-30 21:13 ` Eric Wong
2017-04-02 1:54 ` [PATCH] workaround for unicorn 5.3.0 Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/rainbows/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170402002615.GA32751@starla \
--to=e@80x24.org \
--cc=masterkain@gmail.com \
--cc=rainbows-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/rainbows.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).