Well,
I have waited for days before deciding to post this issue, as I was not sure how to state this, resutling into a long detailed post. However, I think it is re
According to documentation on their wiki they are thread safe:
Because loggers are thread-safe, you can simply create the logger once and store it in a static variable
Based on the error you are getting you are most likely doing exactly what the exception sates: modifying the collection somewhere in the code while the foreach loop is iterating. Since your list is passed by reference this isn't hard to imagine where another thread would be modifying the collection of rules while you are iterating over it. You have two options:
rules.AsReadOnly()) but miss any updates that happen as threads you've spawned create new rules.