]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua_fcn/queue: use atomic load to fetch queue size
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 11 Jul 2023 13:42:00 +0000 (15:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 11 Jul 2023 14:04:39 +0000 (16:04 +0200)
commit33a8c2842bcb11395a1e174f852f02e810c0ce67
treedbb85b68c1e1f426b1f5afc247a5b4f03b5fdc27
parent3f1b901db822c147d88d55270e46d5a33cd16123
BUG/MINOR: hlua_fcn/queue: use atomic load to fetch queue size

In hlua_queue_size(), queue size is loaded as a regular int, but the
queue might be shared by multiple threads that could perform some
atomic pushing or popping attempts in parallel, so we better use an
atomic load operation to guarantee consistent readings.

This could be backported in 2.8.
src/hlua_fcn.c