cond, lock, thread: better 'inline'