Threading issues with events

Mar 10, 2012 at 1:05 PM
Edited Dec 16, 2012 at 8:28 PM

I am worried that events such as:

public event SaveCompletedEventHandler SaveCompleted;

can be called at any time, on an unknown thread

(This is similar to the problem of using the asynchronous pattern in a Windows Forms environment)

I was expecting to see some kind of queuing or waiting of callbacks (similar to the way Shawn implemented the Xna Net classes)

so the callbacks happen at a predictable moment in time

eg. EasyStorage.FlushCallbacks()

Without this feature I can't see this being usable in production

Unless I am missing something?

(edit: the events are only raised during Update() so there is no problem)