[PATCH] D59130: [llvm][Support] Provide interface to set thread priorities

Jan Korous via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 11:11:10 PDT 2019


jkorous added a comment.

We are already using `PRIO_DARWIN_BG` in couple other places - `libclang` and `CrashRecoveryContext` in llvm. According to the linked man page this priority causes I/O to be "throttled" but not halted on macOS.

I definitely see the appeal of having a test but I'm afraid we'd have to speculate about in which ways are going to be future supported platforms weird (e. g. " a mere logging statement would halt the background thread's progress") in order to write a test that could actually find some issues.  I feel like adding regression tests as we go and encounter issues will be more effective.

I also feel that some absolutely generic API for threading is kind of impossible as differences between platforms are real but don't think we really need that level of genericity.

LGTM.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59130/new/

https://reviews.llvm.org/D59130





More information about the llvm-commits mailing list