FubuMvcArchive / FubuMVC.ServerSentEvents

Server sent events for your FubuMVC application
3 stars 2 forks source link

Use BeginFlush in .Net 4.5 to prevent events from getting lost under extreme load #12

Open mtscout6 opened 11 years ago

mtscout6 commented 11 years ago

The default Flush method called in the ServerEventWriter is not thread safe and thus can have the nasty side effect of losing events when under a heavy load.

There is no good solution for this with .Net 4.0, but 4.5 introduces a BeginFlush method. Change the event writer to use this new method.