An excercise implementing a bucket sort using threads in C ++