Subthread sort