Redesigning the Threading Logic

Learn how to redesign threading logic.

The bulk of the code in findMatchingProfiles() that remains after we extract collectMatchSets() and process() is threading logic. We could potentially go even one step further and create a generic method that spawns threads for each element in a collection, but let’s work with what we have now. Here’s the current state of the method:

Get hands-on with 1200+ tech skills courses.