This is the situation :
I have a plugin that starts a timer (runs on a different thread). I can add delegates to this plugin which get called by the timer, but since they will get called in a different thread I can’t use much of the Unity API. To get around this, the delegate only adds an entry to a List. During the Unity Update() I iterate this list, call a bunch of code, and remove the entries. This seems to work just fine, however I believe List isn’t tread safe.
If i’m mistaken and List is thread safe (or at least in this situation), that would be great.
If not, does Unity/mono have any thread safe collections ? Or are there other ways to make it thread safe ?
Thanks in advance.