Code

frontend: Use channel shutdown to synchronize handler thread shutdown.