improve shutdown event handling in processor