It's a little painful to force the users to use a thread local runtime, especially when dropping it. We need to expose the runtime type. This makes some logic a bit more complex. Here I write a guard type EnterGuard to control the "current" runtime. Attacher will also check if the attached runtime is the current runtime.
It's a little painful to force the users to use a thread local runtime, especially when dropping it. We need to expose the runtime type. This makes some logic a bit more complex. Here I write a guard type
EnterGuard
to control the "current" runtime.Attacher
will also check if the attached runtime is the current runtime.