ap: convert to workqueue from thread