GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

kqueue client code, manually relaxing the signal mask for just the single kevent() call waiting for new events.

Download link

https://media.bsd.cafe/bsdmmedia01/media_attachments/files/114/319/100/751/970/447/original/2f5c4626b51468ee.png

Notices where this attachment appears

  1. Embed this notice
    Felix Palmen :freebsd: :c64: (zirias@mastodon.bsd.cafe)'s status on Saturday, 12-Apr-2025 14:38:43 JST Felix Palmen :freebsd: :c64: Felix Palmen :freebsd: :c64:

    First change since #swad 0.2 will actually be a (huge?) improvement to my #poser lib. So far, it was hardwired to use the good old #POSIX #select call. This is perfectly fine for handling around up to 100 (or at least less than 1000, YMMV) clients.

    Some #select implementations offer defining the upper limit for checked file descriptors. Added support for that.

    POSIX also specifies #poll, which has very similar #scalability issues, but slightly different. Added support for this as well.

    And then, I went on to add support for the #Linux-specific #epoll and #BSD-specific #kqueue (#FreeBSD, #NetBSD, #OpenBSD, ...) which are both designed to *solve* any scalability issues 🥳

    A little thing that slightly annoyed me about kqueue was that there's no support for temporarily changing the signal mask, so I had to do the silly dance shown in the screenshot. OTOH, it offers changing event filters and getting events in a single call, which I might try to even further optimize ... 😎

    #C #coding

    In conversation about a month ago from mastodon.bsd.cafe permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.