this `getThreads` call could probably be further optimized (I don't think we need to get all the threads again here either). This is for another patch though, could you file a bug and add a TODO comment here ?