14ea27e65b
The thread registry is creating [Thread] objects when threads enter an isolate (as mutator or helper). Once threads exit an isolate, the [Thread] structure is returned and the thread registry will put it into a cache for later re-use. The mutator [Thread] object is an exception: Exiting and entering the isolate as mutator will always use the same cached [Thread] object. We want to eventually use one thread registry for an entire isolate group. There will therefore be multiple mutator threads per thread registry. We therefore move the cached mutator thread from the thread registry to the [Isolate] object. Issue https://github.com/dart-lang/sdk/issues/36097 Change-Id: Id27dff886d79ca76f6e05320151aeb72c8ba5140 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108720 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>