Fleck icon indicating copy to clipboard operation
Fleck copied to clipboard

Updated public async methods to end with Async suffix.

Open tdupont750 opened this issue 10 years ago • 2 comments

Pull request #126 changed several public methods to become async and return a Task instead of void. This change did not include the recommended naming convention of naming all async methods with the Async suffix.

In my case, this caused us to introduce a bug to a project that was using Fleck. We would ignore Task returned from IWebSocketConnection.Send, and under high load the task scheduler would get backed up.

I have updated the the public methods to include the Async suffix. However, in order to maintain backwards compatibility, I have also added obsolete methods to the interfaces without the suffix.

tdupont750 avatar Dec 06 '15 00:12 tdupont750

In my case, this caused us to introduce a bug to a project that was using Fleck. We would ignore Task returned from IWebSocketConnection.Send, and under high load the task scheduler would get backed up.

curious, instead of ignoring them what did you end up doing with the tasks?

artfulhacker avatar Mar 10 '16 21:03 artfulhacker

I believe that I used a concurrent queue and had a background task serially write messages to the connection.

tdupont750 avatar Mar 13 '16 02:03 tdupont750