Prefer canonical qualified names for classes under `Thread`
As the names show, Mutex, Queue, SizedQueue and ConditionVariable are defined under the Thread namespace, and the top level constants are aliases.
Not to cause confusion, bundled files should use the canonical qualified names at least.
What is the motivation behind this change?
AFAIK most users don't prefix with Thread:: for Queue and Mutex (unless the code is quite old).
I also don't think we can ever remove those top-level constants without causing major compatibility issues.
On CRuby I see:
$ ruby -e 'p Queue'
Thread::Queue
$ ruby -e 'p Mutex'
Thread::Mutex
but on TruffleRuby:
$ ruby -e 'p Queue'
Queue
$ ruby -e 'p Mutex'
Mutex
I don't think it matters too much, but IMHO since the recent usages are predominantly without Thread:: I think that should be the canonical name.
I've merged a9430c7 since that change makes sense no matter what we do next.
@nobu Could you explain the motivation behind this change?
@eregon Filled the description.
@nobu Thanks, I think we should change the canonical names instead so they represent the usages better: https://bugs.ruby-lang.org/issues/18256
Thank you for the PR. I decide to close this. AFAIK most usages by Ruby users are without the Thread:: prefix, and nesting seems to just make it harder to find specs for Mutex/Queue/SizedQueue (+ potential needless conflicts).