News for hackers. Stuff that matters.
Re:Fibers: An Elegant Windows API by jstimpfle on Friday March 29, 2019 @12:09PM (#19522866)
No I'm saying I want to read from N handles simultaneously using M buffers, where M <= N. Of course, the OS shouldn't write to one of my read buffers that currently contains other buffered data. But that doesn't mean that it has to be N = M, since that is a waste.

I guess M = 10 * number of OS threads should usually be plenty to achieve good performance. But I'm happy to be corrected by people more experienced with systems performance.

Re:Fibers: An Elegant Windows API by kbenson on Friday March 29, 2019 @08:04PM (#19526646)
I believe I understand. By not allocating in the api call itself you can pre-allocate your own buffers and keep track of which are in-use and not in-use yourself and use some subset of the total amount that would be allocated in each api call be reusing buffers after a particular connection is done with it. That makes sense.