3 ms·
(author here) I'm just adding data-race free parallelism support to this right now to switch my website over to using it! For those familiar with OCaml syntax,
by avsm 9mo ago
(author here) I'm just adding data-race free parallelism support to this right now to switch my website over to using it! For those familiar with OCaml syntax, the OxCaml parse function is fun:
val parse : buffer -> len:int -> #(status * request * header list) @ local
This takes in a buffer and returns an unboxed tuple on the stack, so there's no GC activity involved beyond stack management for each HTTP request.
https://github.com/avsm/httpz/blob/main/lib/httpz.mli#L154 https://github.com/avsm/httpz/blob/main/lib/httpz.mli#L154
- cdaringe 9mo agoInteresting parser, fun to read.
- henearkr 9mo agoOh I got the joke! (I'm pretty sure it was intended) Yes a parser is a fun to read ;)
- ptrwis 9mo agoDoesn't (honest question) the operating system kernel prevent data races in memory accesses at the level of system calls like brk? I wonder at what level the operating system handles such things?
- ptrwis 9mo agoI mean, aren't system calls thread-safe?
- spooneybarger 9mo agoAs a general rule, not all system calls are thread safe.