Bug
1753350 Don't block PBackgroundParent thread while the main thread processes its queued tasks r=jib
Assumptions about safety of waiting on other threads are very risky when the
threads are shared with other consumers that may be making different
assumptions. cf. https://phabricator.services.mozilla.com/D29701#872962
The thread creation hop was introduced under the assumption that creating and
joining threads from different threads would be problematic.
https://bugzilla.mozilla.org/show_bug.cgi?id=
1209987#c6
No-one identified any particular OS that was problematic.
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread
says
> When a thread terminates, the thread object attains a signaled state,
> satisfying any threads that were waiting on the object.
man 3p pthread_join says
> The results of multiple simultaneous calls to pthread_join() specifying the
> same target thread are undefined.
Differential Revision: https://phabricator.services.mozilla.com/
D140021