xpapoll(3)

πŸ“¦
version 2.1.20 Β· 2 versions
  • 2.1.20 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.1.20 Β· fedora 43, fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 xpapoll(3) β€” the SAORD Documentation glow-up 🌸

okay bestie, gather round, because today we're talking about XPAPoll from the XPA crew (that's SAORD Documentation, iykyk) and honestly? it's giving "polling loop" and it ate πŸ’…


✨ NAME ✨

XPAPoll β€” execute existing XPA requests 🫢


✨ SYNOPSIS ✨

#include <xpa.h>

int XPAPoll(int msec, int maxreq);

✨ DESCRIPTION ✨

so like. sometimes you literally do not want to block, right? you just wanna peek in on your XPA requests, check if anything's happening, and keep it moving. that's a polling loop, and it's exactly the moment where XPAPoll() makes its main character entrance ✨

XPAPoll(int msec, int maxreq);

here's the tea, no cap: XPAPoll() will do an XPAAddSelect() and then a select(), except with a timeout that you hand it via the msec argument β€” and that timeout is measured in millisecs, periodt ⏱️

if one or more XPA requests show up before that timeout expires, then the XPAProcessSelect() routine gets called to actually process those requests. slay. πŸ”₯

now, maxreq is the vibe check on how many requests get processed:

  • if maxreq < 0 β†’ no events are processed, but instead the return value tells you the number of events that are pending πŸ‘€
  • if maxreq == 0 β†’ all currently pending requests get processed πŸ’–
  • otherwise β†’ up to maxreq requests get processed 🌈

and the most usual values for maxreq, fr fr? 0 (process all requests) and 1 (process one request) πŸ‘‘


✨ SEE ALSO ✨

see xpa(n) for a list of XPA help pages πŸ¦‹


and that's the whole page, bestie!! this was version 2.1.15, dated July 23, 2013 β€” yes she's vintage, yes she still serves. bye ily, go process those requests responsibly πŸŽ€βœ¨