mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-30 07:01:22 -03:00
Disable iothread pool wait-around under TSan
The iothread pool has a feature where, if the thread is emptied, some threads will choose to wait around in case new work appears, up to a certain amount of time (500 msec). This prevents thrashing where new threads are rapidly created and destroyed as the user types. This is implemented via `std::condition_variable::wait_for`. However this function is not properly instrumented under Thread Sanitizer (see https://github.com/google/sanitizers/issues/1259) so TSan reports false positives. Just disable this feature under TSan.
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
// block) and use select() to poll it.
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer)
|
||||
#define TOPIC_MONITOR_TSAN_WORKAROUND
|
||||
#define TOPIC_MONITOR_TSAN_WORKAROUND 1
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __SANITIZE_THREAD__
|
||||
#define TOPIC_MONITOR_TSAN_WORKAROUND
|
||||
#define TOPIC_MONITOR_TSAN_WORKAROUND 1
|
||||
#endif
|
||||
|
||||
wcstring generation_list_t::describe() const {
|
||||
|
||||
Reference in New Issue
Block a user