While developing application using AsyncSentinel I discovered there are races in the constructor of AsyncSentinel which are caused by the order of fields intialization. The fields _mutex and _cv are used by the thread _worker however this thread is created before the fields are initialized. This was causing random crashes in my application. I fixed this by reordering the fields and now the crashes are gone.
While developing application using AsyncSentinel I discovered there are races in the constructor of AsyncSentinel which are caused by the order of fields intialization. The fields
_mutex
and_cv
are used by the thread_worker
however this thread is created before the fields are initialized. This was causing random crashes in my application. I fixed this by reordering the fields and now the crashes are gone.