Worker implementation of Qchan.