MEDIUM: threads/filters: Add init/deinit callback per thread
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 27 Jul 2017 14:33:28 +0000 (16:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 12:58:32 +0000 (13:58 +0100)
commit71a6a8efaa6770a505788f872174c1b82c31c1f5
tree802e1f81f5360f6f16b0b01a605404c2ea261981
parente95f2c3ef5489143286e89b288d4950c1d95eb21
MEDIUM: threads/filters: Add init/deinit callback per thread

Now, it is possible to define init_per_thread and deinit_per_thread callbacks to
deal with ressources allocation for each thread.

This is the filter responsibility to deal with concurrency. This is also the
filter responsibility to know if HAProxy is started with some threads. A good
way to do so is to check "global.nbthread" value. If it is greater than 1, then
_per_thread callbacks will be called.
doc/internals/filters.txt
include/types/filters.h
src/filters.c