[Tarantool-patches] [PATCH v2] Add some cancellation guard
Konstantin Osipov
kostja.osipov at gmail.com
Wed Mar 18 11:26:10 MSK 2020
* Leonid Vasiliev <lvasiliev at tarantool.org> [19/12/26 10:51]:
> We need to set a thread cancellation guard, because
> another thread may cancel the current thread at a
> really bad time (messages flush, mutex lock)
>
> Fixes: #4127
I think we have to do this patch, as long as we use
pthread_cancel().
An alternative is to ignore the bug. There is no harm in Tarantool
in crashing at exit, as long as we close the wal first.
And we should close the wal first!
AFAIU pthread_setcancellable is a thread-local and cheap
operation. Could you please confirm this? (I haven't studied the
pthread implementation code since 2001, when Linux only had Xavier
Leroy's threads).
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list