| 85 | ThreadPool(int stackSize, int pri) : dontstop(ios), mode(Run), stackSize(stackSize), pri(pri) {} |
| 86 | ~ThreadPool() override {} |
| 87 | Future<Void> stop(Error const& e = success()) override { |
| 88 | if (mode == Shutdown) |
| 89 | return Void(); |
| 90 | ReferenceCounted<ThreadPool>::addref(); |
| 91 | ios.stop(); // doesn't work? |
| 92 | mode = Shutdown; |
| 93 | for (int i = 0; i < threads.size(); i++) { |
| 94 | waitThread(threads[i]->handle); |
| 95 | delete threads[i]; |
| 96 | } |
| 97 | ReferenceCounted<ThreadPool>::delref(); |
| 98 | return Void(); |
| 99 | } |
| 100 | |
| 101 | Future<Void> getError() const override { return Never(); } // FIXME |
| 102 | void addref() override { ReferenceCounted<ThreadPool>::addref(); } |
nothing calls this directly
no test coverage detected