N
nicholas.entropy
hello, there are multiple threads get access to the different segments
of a large array, lets say, the first thread does quick sort to the
array[0]...array[10000], the second thread does the same to array
[10001]...array[20000], and so on. If the array is at global scope,
and because each thread is using different segments of the array,
when I call pthread_create(&threads,&attr,quicksort_begin,(void *)
i), do I have to use metux to lock the whole array for each thread? I
think it not necessary because each thread has its own segment. what
do you think?
Thank you very much for help.
nick
of a large array, lets say, the first thread does quick sort to the
array[0]...array[10000], the second thread does the same to array
[10001]...array[20000], and so on. If the array is at global scope,
and because each thread is using different segments of the array,
when I call pthread_create(&threads,&attr,quicksort_begin,(void *)
i), do I have to use metux to lock the whole array for each thread? I
think it not necessary because each thread has its own segment. what
do you think?
Thank you very much for help.
nick