MAJOR: threads/peers: Make peers thread safe
authorEmeric Brun <ebrun@haproxy.com>
Mon, 19 Jun 2017 15:46:37 +0000 (17:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 12:58:31 +0000 (13:58 +0100)
commit80527f5bb605ab7a50533175c611686e62fe23b6
tree27b7b8ba118b3ebabc7f0f72b19b67cbeba82493
parent1138fd0c576d8ac9ba28a57da3463de72022bea5
MAJOR: threads/peers: Make peers thread safe

A lock is used to protect accesses to a peer structure.

A the lock is taken in the applet handler when the peer is identified
and released living the applet handler.

In the scheduling task for peers section, the lock is taken for every
listed peer and released at the end of the process task function.

The peer 'force shutdown' function was also re-worked.
include/common/hathreads.h
include/types/applet.h
include/types/peers.h
src/cfgparse.c
src/peers.c