21/11/24 Go Reject Con 2021にて発表 https://moneyforward.connpass.com/event/228698/
タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。
libxev is a cross-platform event loop. libxev provides a unified event loop abstraction for non-blocking IO, timers, signals, events, and more that works on macOS, Windows, Linux, and WebAssembly (browser and WASI). It is written in Zig but exports a C-compatible API (which further makes it compatible with any language out there that can communicate with C APIs). Project Status: 🐲 Unstable, alpha
κeenです。 普段お世話になってるけど使ったことのないAPIを叩いてみよう、ということで epoll(7) を使ってみます。 Epollとは epoll(7) はLinux固有のAPIで、パイプやソケットなど出入力に待ちが発生する対象を複数同時に待つ、いわゆるIOの多重化の機能を提供します。 同等のことをするAPIはUNIX全般で使える select(2) や poll(2) などもありますが、使い勝手やパフォーマンスの面で epoll が勝るようです。 一方で epoll(7) はLinux固有のAPIなのでmacOSやFreeBSDでは使えません。それらのOSでは別のAPI(kqueue(2))を叩くことになります。 Rustならmioが互換レイヤとして存在し、LinuxでもBSDでもmacOSでも使えるライブラリになっています。 mioはTokioなんかで使われていますね。ですが今
Basic non-blocking IO using epoll in Rust I’ve been using async, or non-blocking IO systems for years in multiple languages such as JavaScript (Node.js), Java/Kotlin and Rust. I couldn’t, however, explain very well how it works under the hood and while I heard about poll, select, epoll, event queues and the like before, I wouldn’t have been confident explaining how non-blocking IO actually works t
この記事は sadnessOjisan Advent Calendar 2021 20 日目の記事です。書かれた日付は 1/13 です。 フロントエンドエンジニアとして JS を JS のレイヤーでしか扱ったことがなかった僕が NodeJS の非同期ランタイムを調べていたときについでで epoll を勉強したときのメモをまとめたものです。 コンピュータサイエンスの専門的な教育を受けたわけでもないし、趣味でしか勉強したことがない範囲なので、もしかしたら間違いがあるかもしれません。 そのため間違いを発見しましたらご指摘してくれると助かります。(https://github.com/sadnessOjisan/blog.ojisan.io に PR/Issue を投げてくれると一番助かります。) 参考にしたもの ふつうの Linux プログラミング 第 2 版 Linux の仕組みから学べる
Updated 2023-01-15 At the start of this year I argued that epoll is the API that powers the modern Internet, but what can you actually do with epoll? Once we structure our application around an epoll event loop or use an async engine such as Go or Rust’s tokio, it becomes really useful to integrate everything else into that event loop. What types of file descriptors can you add to epoll_ctl? What
epoll について勉強した。nginx や node.js (libuv) の内部でも普通に使われているらしい (知らなかった)。 具体的にはシステムコールとして提供されている epoll_create, epoll_wait, epoll_ctl について、 epoll の man (https://linuxjm.osdn.jp/html/LDP_man-pages/man7/epoll.7.html) に載っているサンプルにコメントを書いて理解した。 因みに epoll は Linux に特有であり, BSD では kqueue というものが使われているらしい。 #define MAX_EVENTS 10 // listen_sock は listen socket を参照するfdであり、socket(2) の戻り値。たくさんのリクエストを受け付ける。 // 今は省いているが、事前
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く