both getAllThreads and getAllThreads2 seem to work, before replacement
bugfixes and remove old impl of getAllThreads