sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Daniele Orlandi <daniele@orlandi.com>
To: sleepy-penguin@bogomips.org
Subject: Events are still delivered after an IO object is deleted from epoll
Date: Mon, 7 Dec 2015 04:40:13 +0100	[thread overview]
Message-ID: <5664FF9D.4030408@orlandi.com> (raw)


Hello,

I have a classic event loop like this:

      loop do
        @actor_epoll.wait do |events, io|
          receive(events, io)
        end
      end

In #receive, sometimes I close and remove an "io" object from the epoll
via #del (e.g. in a timerfd I close ad remove a socket)

However it appears that if there are queued events the block may still
be called afterwise.

Not a big deal, easily workaround-able, but you may want to give a look
at it.

Bye,

-- 
  Daniele Orlandi


             reply	other threads:[~2015-12-07  3:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07  3:40 Daniele Orlandi [this message]
     [not found] <5664FAC6.8040705@orlandi.com>
2015-12-07  4:13 ` Events are still delivered after an IO object is deleted from epoll 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/sleepy_penguin/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5664FF9D.4030408@orlandi.com \
    --to=daniele@orlandi.com \
    --cc=sleepy-penguin@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/sleepy_penguin.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).