Why is my code not thread save?
is in a loop
tasks is a list of tasks which add elements to a list;
Selection is a method which edits the list (cuts off the worse results that were delivered when "tasks" were executed)
I thought that all tasks are finished when starting Selection() and i start it like this afterwards.
But i always get the following error after a few cycles: