Does Worker.Shutdown() Finish pending activities prior to exit

I have a workflow that runs data intensive activities (An activity may spend 20+ processing data). I want to autoscale my workers, but I want my worker to finish any ‘pending’ activities when it is Shutdown(). I do not want to shutdown a worker and have it lose the progress it has made on a long running activity.

Does the Shutdown() Method handle this case and gracefully finish any pending activities before the worker exits?

Yes, with configurability. See the activity worker shutdown section of the README.