Commit Graph

19 Commits

Author SHA1 Message Date
ejurgensen
18a80f15dd [httpd] Multithread solution using worker threads instead of httpd threads
Using worker threads instead of httpd threads means that we, not libevent,
decide which requests get handled by which threads. This means that we can
make sure blocking requests (e.g. volume changes) don't get in the way of
realtime(ish) stuff like mp3 streaming.

Includes refactor of httpd_stream_file() since it was a bit of a monster.
2023-03-07 21:01:45 +01:00
ejurgensen
4d0c297901 [evhtr] Consolidate pool threading in evthr.c
Also reinstate check for server already running
2023-03-07 21:01:10 +01:00
ejurgensen
bd6f38282c [httpd] Main commit that adds multithreading to httpd
Also refactor streaming implementation to make it more like an output and to
let the design support multithreading.
2023-03-07 21:01:10 +01:00
ejurgensen
4736e10d11 [worker] Remove some unused includes 2023-03-07 21:01:10 +01:00
ejurgensen
3377faffb8 [worker] Switch worker to use evthr threadpool 2023-03-07 21:01:10 +01:00
ejurgensen
d2f4efa1bf [misc] Centralize thread naming plus name websocket thread 2021-07-05 21:40:31 +02:00
ejurgensen
3885b92111 [worker] Remove not-so-useful log message 2020-05-25 22:42:22 +02:00
ejurgensen
061beaf272 [worker] Make sure worker accepts NULL-arguments 2017-01-27 22:35:16 +01:00
ejurgensen
bdd6bab982 [-] Lots of housekeeping thanks to scan-build and input from @acmay 2016-11-19 23:08:50 +01:00
chme
32ac6c2ea9 [commands] Rename commands_cmdloop_break to commands_base_destroy and
free commands_base after breaking the libevent loop
2016-06-11 10:56:27 +02:00
chme
5258ee712c [commands] Added functionality to break the event loop of a command base 2016-06-11 09:52:31 +02:00
chme
5dc1cba5c8 On deinit free event base before freeing command base and pipes 2016-05-21 06:48:02 +02:00
chme
32944d7273 [worker] Use generic inter thread commands util 2016-05-15 08:42:15 +02:00
ejurgensen
9a56044c77 [misc] Explicitly check for pthread_setname_np/pthread_set_name_np
Seems there is no pthread_setname_np in OpenWrt
2016-05-05 19:39:15 +02:00
ejurgensen
b454a2fd60 [general] Put back support for platforms without pipe2(), see issue #239 2016-03-17 22:20:16 +01:00
chme
98d6db002f Set thread names to make it easier to identify threads during debugging 2016-03-12 14:01:08 +01:00
ejurgensen
55104015e0 Full removal of libevent 1 legacy code. Also drop pipe() in FreeBSD, since pipe2 is available now. 2015-10-19 21:15:29 +02:00
ejurgensen
e084eb71db Polishing worker.c a bit 2015-04-01 14:36:24 +02:00
ejurgensen
e49c941a00 Add a worker thread to support async tasks from the player thread
(and maybe others later)
2015-03-31 23:05:24 +02:00