ARES_QUEUE(3)
π ARES_QUEUE(3) π
okay bestie, so this is the ARES_QUEUE page from the Library Functions Manual β it's giving "how do I even know if my DNS stuff is done yet" and honestly? iconic question. come sit with me π«Ά
β¨ NAME β¨
ares_queue_wait_empty, ares_queue_active_queries β functions for checking the c-ares queue status. literally just vibes-checking your queue, no cap π
πΈ SYNOPSIS πΈ
#include <ares.h>
size_t ares_queue_active_queries(const ares_channel_t *channel);
ares_status_t ares_queue_wait_empty(ares_channel_t *channel,
int timeout_ms);
π¦ DESCRIPTION π¦
ares_queue_active_queries(3) π«
so this one retrieves the total number of active queries pending answers from servers. that's it, that's the function, she's simple and she's thriving.
and bestie, important lore: some c-ares requests may spawn multiple queries β like ares_getaddrinfo(3) when using AF_UNSPEC β and that will be reflected in this number. so don't be gagged when the count is higher than you expected, it's not a bug, it's just her being thorough π
the channel parameter must be set to an initialized channel. no initialized channel? no results. periodt.
ares_queue_wait_empty(3) π«
this one blocks until notified that there are no longer any queries in queue, or the specified timeout has expired. so she'll just sit there, patiently, like a bestie waiting outside the changing room π
the channel parameter must be set to an initialized channel (again, we mean it).
the timeout_ms parameter is the number of milliseconds to wait for the queue to be empty β or -1 for Infinite. yes, Infinite. capital I. main character energy π
β RETURN VALUES β
ares_queue_active_queries(3)returns the active query count.ares_queue_wait_empty(3)can return any of the following values:ARES_ENOTIMPβ if not built with threading support πARES_ETIMEOUTβ if requested timeout expired πARES_SUCCESSβ when queue is empty. slay π
π AVAILABILITY π
this function was first introduced in c-ares version 1.27.0, and it requires the c-ares library to be built with threading support.
ngl bestie, if you're not built with threading support,ares_queue_wait_empty(3)is gonna hand you anARES_ENOTIMPand there is nothing anyone can do about it. know your build π
π₯ SEE ALSO π₯
okay that's the whole page, you ate it, I'm obsessed π this was the ARES_QUEUE(3) page, 16 February 2024 edition β go forth and queue responsibly, bestie π§β¨
π¦ where this page comes from
- alpine 3.22: c-ares-doc 1.34.9-r0 Β· MIT
- alpine 3.23: c-ares-doc 1.34.9-r0 Β· MIT
- alpine 3.24: c-ares-doc 1.34.9-r0 Β· MIT
- arch rolling: c-ares 1.34.9-1 Β· MIT
- centos-stream 10: c-ares-devel 1.34.9-1.el10 Β· MIT
- debian trixie: libc-ares-dev 1.34.5-1+deb13u1 Β· MIT
- fedora 43: c-ares-devel 1.34.5-2.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.5-2.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.8-1.fc43 Β· MIT
- fedora 43: c-ares-devel 1.34.8-1.fc43 Β· MIT
- fedora 44: c-ares-devel 1.34.6-3.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.6-3.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.8-1.fc44 Β· MIT
- fedora 44: c-ares-devel 1.34.8-1.fc44 Β· MIT
- nixos 26.05: c-ares 1.34.9
- nixpkgs unstable: c-ares 1.34.8
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- opensuse-leap 16.0: c-ares-devel 1.34.8-160000.1.1 Β· MIT
- ubuntu questing: libc-ares-dev 1.34.5-1
- ubuntu questing: libc-ares-dev 1.34.5-1ubuntu0.1
- ubuntu resolute: libc-ares-dev 1.34.6-1 Β· MIT
- ubuntu resolute: libc-ares-dev 1.34.6-1ubuntu0.1
- ubuntu resolute: libc-ares-dev 1.34.6-1ubuntu0.2 Β· MIT
- ubuntu stonking: libc-ares-dev 1.34.8-1 Β· MIT
- π the page's license: MIT
- Copyright 2024 by the c-ares project and its contributors
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms