In message <@shagadelic.org>,
Jason Thorpe writes:
Mar 1, 2007, at 10:22 AM, jonathan (AT) dsg (DOT) stanford.edu wrote:
>
>Well, the typical way to implement AI is to have a pool of kernel
>threads. Grab a kernel thread, issue the i/o, using the kernel thread
>as the thread which blocks until the I/ is complete. Then the kernel
>thread posts completion to the AI subsystem, which passes appropriate
>status, signal info, etc. to the requesting thread. Hmmmm,
>continuations :-/.
>
>and that's an awful way to do it considering how all of the
>underlying primitives that those blocking APIs use are asynchronous.
Yes, exactly. (I did say "typical", I was trying to be polite.)
If you recall that back when I committed kcont(9), I beleive I
suggested asynchronous I/ as one obvious use for kcont. I seem to
recall some objections that continuations were too difficult to
understand; but maybe I'm misremembering.