Sujet : Re: OT: Windows (Was: Re: Open Source does not mean easily
De : nicolas$george (at) *nospam* salle-s.org (Nicolas George)
Groupes : comp.unix.programmerDate : 07. Jan 2025, 01:49:32
Autres entêtes
Organisation : Guest of ProXad - France
Message-ID : <677c7a1b$0$28501$426a74cc@news.free.fr>
References : 1 2 3 4 5 6
User-Agent : Flrn (0.9.20070704)
Kalevi Kolttonen, dans le message <
vlh5ag$1nruu$1@dont-email.me>, a
écrit :
I am no expert, but I guess if you need to do async programming
on UNIX/Linux userspace, your best is to use POSIX Threads.
Very common misconception. The communication mechanisms between POSIX
threads and Unix I/O are completely alien to each-other: it is not possible
to poll() on a thread condition, nor is it it possible to set up a condition
to be woken by data on a file descriptor. As a result, anybody who tries to
use threads to solve problems of I/O concurrency ends up having to implement
a poll() or equivalent loop in each thread, defeating the purpose.
POSIX threads are good to improve on computation concurrency, but they do
not make I/O concurrency simpler, quite the opposite.
The same might not be true for other kinds of threads.