zhztheplayer commented on code in PR #12302:
URL: https://github.com/apache/gluten/pull/12302#discussion_r3426712188
##########
cpp/core/compute/Runtime.h:
##########
@@ -189,6 +197,7 @@ class Runtime : public
std::enable_shared_from_this<Runtime> {
protected:
std::string kind_;
MemoryManager* memoryManager_;
+ ThreadManager* threadManager_;
Review Comment:
Good point. The destruction is guaranteed to be right earlier than
destruction of memory manager, by its priority settings:
https://github.com/zhztheplayer/gluten/blob/312f45bf71dcb68d601e39812df30ddca4a90c8f/gluten-arrow/src/main/scala/org/apache/gluten/threads/NativeThreadManager.scala#L57
> initially we run into some leakage from VeloxRuntime and we need to
careful on destructor
I was aware of this, and this kind of leakage was fundamentally fixed at
once by https://github.com/apache/gluten/pull/11882, specifically, by the
introduction of HookedExecutor. HookedExecutor can reuse OS thread resources,
while it guarantees no background threads are running before we end the Velox
task. Precondition is, Velox should keep avoiding running threads off the
thread pools we pass to it, and this rule is unlikely to be broken by Velox
shortly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]