Perhaps one of the regular committers can turn off PROFILE_JL_THREADING in master. @yuyichao or @jameson?
JULIA_THREAD_SLEEP_THRESHOLD specifies, in nanoseconds, how long spinning threads should wait before sleeping. The word “infinite” is translated to 0 (haha!), which actually means: disable thread sleeping. I should have made it -1 instead.
Having a way to set the sleep threshold dynamically makes sense and I’ll likely add this to the new threading code… but.
A key goal for Julia’s threading model is high productivity and hence a simple and minimal interface is desirable (though obviously, not at the expense of important functionality). Complicated threading interfaces (like OpenMP) start getting complicated in just this way – by adding reasonable features. Before you know it, you have dozens of such features. It’s worth debating the addition of every one.