Next: Strings and Characters, Previous: Native Windows Support, Up: GNU Gnulib [Contents][Index]
Multithreading is a programming paradigm. In a multithreaded program, multiple threads execute concurrently (or quasi concurrently) at different places in the program.
There are three motivations for using multithreading in a program:
select
or poll
on all the descriptors and then dispatches
according to from which descriptor input arrived. In a multi-threaded
program, you allocate one thread for each descriptor, and these threads can
be programmed and managed independently.
malloc
; therefore you are very limited in what you can do in
a signal handler. But a signal handler can notify a thread, and the thread
can then do the appropriate processing, as complex as it needs to be.
A multithreading API offers
Note: Programs that achieve multithreading through OpenMP (cf. the gnulib module ‘openmp’) don’t create and manage their threads themselves. Nevertheless, they need to use mutexes/locks in many cases.
Next: Strings and Characters, Previous: Native Windows Support, Up: GNU Gnulib [Contents][Index]