cosmopolitan/tool/net
Steven Dee (Jōshin) b40140e6c5
Improve redbean concurrency (#1332)
In the course of playing with redbean I was confused about how the state
was behaving and then noticed that some stuff is maybe getting edited by
multiple processes. I tried to improve things by changing the definition
of the counter variables to be explicitly atomic. Claude assures me that
most modern Unixes support cross-process atomics, so I just went with it
on that front.

I also added some mutexes to the shared state to try to synchronize some
other things that might get written or read from workers but couldn't be
made atomic, mainly the rusage and time values. I could've probably been
less granular and just had a global shared-state lock, but I opted to be
fairly granular as a starting point.

This also reorders the resetting of the lastmeltdown timespec before the
SIGUSR2 signal is sent; hopefully this is okay.
2024-12-02 14:05:38 -08:00
..
demo Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
tiny Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
.init.lua Add SSL to redbean 2021-06-24 13:20:50 -07:00
BUILD.mk Implement proper time zone support 2024-05-04 23:06:37 -07:00
counters.inc Make fixes and improvements 2022-10-19 07:19:19 -07:00
definitions.lua Correct redbean unix.commandv() docs 2024-11-29 12:15:03 -08:00
dig.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
echo.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
favicon.ico Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
fetch.inc Make redbean Fetch() support longer responses 2024-10-12 15:59:46 -07:00
getadaptersaddresses.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
help.txt Correct redbean unix.commandv() docs 2024-11-29 12:15:03 -08:00
largon2.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
launch.c Support any HTTP method 2024-02-22 14:12:18 -08:00
lfinger.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
lfinger.h Reduce header complexity 2023-11-28 14:39:42 -08:00
lfuncs.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
lfuncs.h [Redbean] Add UuidV7 method (#1213) 2024-07-01 06:06:56 -07:00
libresolv_query.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
ljson.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
ljson.h Reduce header complexity 2023-11-28 14:39:42 -08:00
lmaxmind.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
lpath.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
lpath.h Reduce header complexity 2023-11-28 14:39:42 -08:00
lre.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
lsqlite3.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
luacheck.h Reduce header complexity 2023-11-28 14:39:42 -08:00
redbean-original.c Remove plenty of makefile misconfigurations 2022-07-21 09:20:59 -07:00
redbean-static.c Remove plenty of makefile misconfigurations 2022-07-21 09:20:59 -07:00
redbean-unsecure.c Remove plenty of makefile misconfigurations 2022-07-21 09:20:59 -07:00
redbean.c Improve redbean concurrency (#1332) 2024-12-02 14:05:38 -08:00
redbean.png Make improvements 2020-09-14 00:02:34 -07:00
sandbox.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
winbench.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00