It might, although I would expect in many cases for the issues hitting the limit to have osquery being unresponsive to a nice stop anyway.
If we had a bit less code, or had ingrained since the start a collaborative approach, between the table logic and the watchdog, then maybe having some kind of delay and expect the worker to exit cleanly was sort of ok.
Another way would be to add two limits, so that there’s the usual limit that can be hit, we give a graceful kill, but if in the next 2 seconds or so the CPU consumption continue or the memory keeps increasing, then we give an immediate kill.
This a tad less immediate to implement though.