Liste des Groupes | Revenir à cu programmer |
On Mon, 6 Jan 2025 16:39:49 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wibbled:In article <vlgun1$1minf$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:>On Mon, 6 Jan 2025 15:22:51 -0000 (UTC)>
Multiplexing is not asychronous, its simply offloading status checking to
the kernel.
Of course. It's a means to allow a program to respond to
asynchronous events.
Thats not the same as the program itself being asynch.
>The program using is still very much sequential , at least at>
that point.
But the events are not. That's the point. This allows a
program to initiate a non-blocking IO operation (like, say,
establishing a TCP connection using the sockets API), go do
something else, and check it's status later.
Thats not proper asych, its still sequential. Proper asynch is when the
program execution path is directly modified by external events. Otherwise
you could claim simply using the standard file I/O system is asynchronous
programming as there's no guarantee that any data has been written to the disk
before write(), fprintf() etc return.
>Posix AIO is not asynch in the strict sense , its more "ok kernel, go do this>
and I'll check how you're doing later". Proper asynch where the program
execution path gets bounced around between various callbacks is something
else entirely.
The POSIX AIO interface allows the kernel to generate a signal
to inform the program that an IO operation has completed, e.g.,
by setting up the `aio_sigevent` and `SIGEV_SIGNAL`. It doesn't
get much more asynchronous than that.
Sure, but as I've said before, signals should only set flags to be processed
later.
Les messages affichés proviennent d'usenet.