Terminate worker after parsing is complete.