Closed craff closed 1 year ago
That makes sense, I guess. I have a branch where I tried that but I don't recall why I didn't push through.
I forgot an exception catch. I probably know why you did not... This requires a lot of tests because this is catchy! I will write more stressfull test for Tiny_httpd_domains (I have a branch on my fork named domains2, that you can follow) and I will do a PR to add those test to normale Tiny_httpd too. I think you should only accept this PR after that.
I will also read the code for input to handle Unix_error exception in the same way.
Hello
Please have a look at the branch domains2 from https://github.com/craff/tiny_httpd
It already works with the current tests. Need improvement: to yield a bit less (now it yield at each read or write). And also better priority queues. I first will do more stressing tests.
May be this will convince you that we do not need Eio?
I would like to push a PR for this on your repository on a branch named domain (or whatever you like)
Do you think this is a good idea ?
May I have you email too (avoid discussing on places not relevant on github ?)
Cheers, Christophe
-- Christophe Raffalli tél: +689 87 23 11 48 web: http://raffalli.eu
my email is in my github profile :)
I still don't think I like the idea of a custom scheduler for domains. It can't be in tiny_httpd anyway, because of compatibility with OCaml < 5 (we could keep both but it's tricky to have that kind of conditional compilation). At this point I see little upside in using domains without Eio:
Before trying to use domains for real, I felt it is better to replace in channel by file descriptor to avoid stacking two buffers. It should be and seems like a few percent faster but would need real testing to check.
I kept of_chan, but it is not used anymore .... May be we should remove it?