Timeline for Type-Safe Event System
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 22, 2016 at 6:51 | comment | added | Jordan | Since I'm using Unity3d, I can't use ConcurrentDictionary. Also, I'm not using threads in my game, so I guess it should be fine. As it turns out, Unity is largely not thread-safe to begin with. That's good to know, though! | |
Feb 21, 2016 at 20:12 | comment | added | ChrisWue | @Jordan: C# events are thread-safe in the sense that you can raise the event while some is un/subscribing from/to it. The ConcurrentDictionary would help with the central event listeners, you'd also have to put in a concurrent collection to store the actual callbacks | |
Feb 21, 2016 at 20:04 | comment | added | Jordan | When you say that I should use ConcurrentDictionary, does that also help address thread-safety, or just performance? Are built-in c# events thread-safe? | |
Feb 21, 2016 at 9:59 | history | answered | ChrisWue | CC BY-SA 3.0 |