]> git.kaiwu.me - haproxy.git/commit
MEDIUM: task: make notification_* API thread safe by default
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 1 Apr 2025 14:07:39 +0000 (16:07 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 3 Apr 2025 15:52:50 +0000 (17:52 +0200)
commit11d4d0957e4711cccb120238a9bad6b914b057a1
treedae5409715f9b5c92184a90c3fae4f2e07066869
parent976890edda6cfe4393683c5824712c61fe1f2650
MEDIUM: task: make notification_* API thread safe by default

Some notification_* functions were not thread safe by default as they
assumed only one producer would emit events for registered tasks.

While this suited well with the Lua sockets use-case, this proved to
be a limitation with some other event sources (ie: lua Queue class)

instead of having to deal with both the non thread safe and thread
safe variants (_mt suffix), which is error prone, let's make the
entire API thread safe regarding the event list.

Pruning functions still require that only one thread executes them,
with Lua this is always the case because there is one cleanup list
per context.
include/haproxy/task-t.h
include/haproxy/task.h
src/hlua.c
src/hlua_fcn.c