bindings: cxx: tests: don't use the same chip from different threads
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 19 Sep 2023 09:31:41 +0000 (11:31 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 25 Sep 2023 07:00:11 +0000 (09:00 +0200)
commitb91187b7cdaab1789695c668432907b3381e6ea5
tree5367a95efac4e78bd12411323970659173a6f0ba
parentec76ea717bc2aa4f083c22928c76cbfe0bc38e83
bindings: cxx: tests: don't use the same chip from different threads

There are no thread-safety guarantees in libgpiod. Let's not reuse the
chip object created in one thread to generate info events in another but
create a second chip for that purpose instead.

Reported-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Erik Schilling <erik.schilling@linaro.org>
bindings/cxx/tests/tests-info-event.cpp