Just one point I would add to this, since the question specifically mentioned spreading the load over all the CPU cores… despite the multiple threads, it does not actually mean that they will be spread over all the CPU cores, since that job is left up to the kernel to decide how best to distribute resources.
@Ibtissam_serbouti : when the actual workload of the various threads starts to consume significant CPU resources (the example is trivial and the workload from actually switching the threads to other CPU cores would vastly exceed the actual job being performed), the kernel will move them around to other cores in order to achieve the objectives it is configured for, which could be to maximize performance, minimize power consumption, or some balance of each.