public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bugzilla at tecnocode dot co.uk" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/30287] sigevent needs a notification method compatible with poll
Date: Mon, 15 May 2023 14:40:04 +0000	[thread overview]
Message-ID: <bug-30287-131-dPTg5oW33p@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30287-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30287

--- Comment #4 from Philip Withnall <bugzilla at tecnocode dot co.uk> ---
`timerfd_create()` does emit a notification via an FD, yes, but I don’t see how
that could be hooked up to `getaddrinfo_a()` using existing APIs, so that it
efficiently emits its notification when the address lookup is complete.

That could be achieved by using `SIGEV_THREAD` and calling `timerfd_settime()`
from the thread function to fire the timerfd when the address lookup is
complete. That doesn’t solve the original problem, though, because it requires
a thread to be spawned to fire the timerfd. That’s not very performant, and
shouldn’t be necessary at all: firing a timerfd is basically a single bit
change in a data structure, not a complex block of work which should need to be
run in a separate thread.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2023-05-15 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 15:54 [Bug libc/30287] New: " bugzilla at tecnocode dot co.uk
2023-04-02 19:16 ` [Bug libc/30287] " fw at deneb dot enyo.de
2023-04-25 17:11 ` bugzilla at tecnocode dot co.uk
2023-04-25 17:16 ` fweimer at redhat dot com
2023-05-15 14:40 ` bugzilla at tecnocode dot co.uk [this message]

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

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

  git send-email \
    --in-reply-to=bug-30287-131-dPTg5oW33p@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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.
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).