thread_pthread: retry timer thread creation w/o attr on EINVAL
Setting a small stack size can fail due to having 3rd-party libraries (e.g. libkqueue) loaded, if those libraries use thread-local-storage (__thread) heavily. This causes pthread_create to fail with small stacks; even if our timer_thread function does not hit any of the TLS-using code paths.
Today, some RubyGems are capable of using libkqueue (or __thread storage directly), and future versions of Ruby may use kqueue internally.
thread_pthread: retry timer thread creation w/o attr on EINVAL
Setting a small stack size can fail due to having 3rd-party
libraries (e.g. libkqueue) loaded, if those libraries use
thread-local-storage (__thread) heavily. This causes
pthread_create to fail with small stacks; even if our
timer_thread function does not hit any of the TLS-using code
paths.
Today, some RubyGems are capable of using libkqueue (or __thread
storage directly), and future versions of Ruby may use kqueue
internally.
cf. https://www.akkadia.org/drepper/tls.pdf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e