c# - How to know threadid for each thread spawn by parallel.foreach -


i have scenario this

int arr[100];  parallel.foreach(arr, (a) => { processing}); 

now, code spawn 100 child threads, how can know thread id each child thread in "some processing" logic.

you use

thread.currentthread.managedthreadid  

but note parallel foreach not forced create 100 threads.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -