### Motivation Right now, if stopping [WorkerService](https://github.com/apache/incubator-pulsar/blob/master/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java#L189) doesn't stop functions and all the threads stayed alive event `WorkerService` is stopped.
### Modifications Stop all function resource gracefully while stopping worker service. ### Result Function threads will not stay alive while stopping worker-service. [ Full content available at: https://github.com/apache/incubator-pulsar/pull/2548 ] This message was relayed via gitbox.apache.org for [email protected]
