]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: tasks: use the local state, not t->state, to check for tasklets
authorWilly Tarreau <w@1wt.eu>
Fri, 2 May 2025 08:55:43 +0000 (10:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 May 2025 09:09:28 +0000 (11:09 +0200)
commit1ed238101aaf0bd944aa112501dd5a1ba631cb9a
tree54a9dd8ed3c37ea59070c1a6fd372e8cf9cb695e
parent45e83e8e81ca76d91a4e9b3e5d065e9d78ba4d57
CLEANUP: tasks: use the local state, not t->state, to check for tasklets

There's no point reading t->state to check for a tasklet after we've
atomically read the state into the local "state" variable. Not only it's
more expensive, it's also less clear whether that state is supposed to
be atomic or not. And in any case, tasks and tasklets have their type
forever and the one reflected in state is correct and stable.
src/task.c