You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Providing thread count - inaccurate if threads start more threads, can be better provided by ext-pmmpthread directly
Stopping threads which haven't stopped themselves - mostly pointless
threads will join themselves when __destruct()'d under normal circumstances, which ThreadManager actually interferes with by keeping strong references
on-shutdown thread stopping can be implemented by overriding join() which will be called directly by ext-pmmpthread during __destruct()
Simulating detach() and/or leaking threads - not a particularly useful case, and can also be simulated more intentionally by implementing detach() in ext-pmmpthread directly
Delaying automatic attempts to stop threads to allow ServerKiller functionality to work - not sure how to replace or remove this
In addition:
Even if it did track threads started by other threads, we wouldn't actually want ThreadManager to try and stop them, because the parent of a thread can't be join()'d before its children are also join()'d. At best we would want to stop them in reverse order, which it's never done.
TL;DR: ThreadManager no longer serves a useful purpose, and is actually probably detrimental in some cases.
The text was updated successfully, but these errors were encountered:
Description
The only remaining uses for ThreadManager are:
ext-pmmpthread
directly__destruct()
'd under normal circumstances, which ThreadManager actually interferes with by keeping strong referencesjoin()
which will be called directly byext-pmmpthread
during__destruct()
detach()
and/or leaking threads - not a particularly useful case, and can also be simulated more intentionally by implementingdetach()
inext-pmmpthread
directlyServerKiller
functionality to work - not sure how to replace or remove thisIn addition:
join()
'd before its children are alsojoin()
'd. At best we would want to stop them in reverse order, which it's never done.TL;DR: ThreadManager no longer serves a useful purpose, and is actually probably detrimental in some cases.
The text was updated successfully, but these errors were encountered: