fixup! fixup! [K/N][New MM] Disallow getting thread data for detached threads

This commit is contained in:
Ilya Matveev
2021-09-15 20:15:00 +07:00
committed by Space
parent 474b2fc90e
commit 35ff131608
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -389,7 +389,8 @@ namespace kotlin {
namespace mm {
// Returns the MemoryState for the current thread.
// The current thread must be attached to the runtime.
// For the new MM, the current thread must be attached to the runtime.
// For the legacy MM, returns nullptr if called on a thread that is not attached to the runtime.
// Try not to use it very often, as (1) thread local access can be slow on some platforms,
// (2) TLS gets deallocated before our thread destruction hooks run.
MemoryState* GetMemoryState() noexcept;