doc: document thread subqueries