I have a script similar to this
int arr[100]; Parallel.Foreach(arr, (a) => { some processing});
Now this code will spawn 100 child threads, how can I find out the thread identifier for each child thread in the "some processing" logic.
you can use
Thread.CurrentThread.ManagedThreadId
but note that your concurrent foreach is not forced to actually create 100 threads.