fix race condition in SelectInteruptPipe, where _fildes are not protected (caught by fedora tsan)
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
@ -30,6 +31,7 @@ namespace ix
|
||||
// happens between a control thread and a background thread, which is
|
||||
// blocked on select.
|
||||
int _fildes[2];
|
||||
mutable std::mutex _fildesMutex;
|
||||
|
||||
// Used to identify the read/write idx
|
||||
static const int kPipeReadIndex;
|
||||
|
Reference in New Issue
Block a user