Currently in the .NET client we serialize invoking user callbacks upon receiving messages from the server using a TaskQueue. This includes callbacks registered using HubProxy.On or continuations after HubProxy.Invoke.
If these callbacks block, especially blocking waiting on result from another callback, the receive dispatch queue will simply stop (deadlock).
We should detect this condition and trace an error when it occurs (Connection.OnError).
We could do this in the TaskQueue itself (with an optional flag that enables it of course) that makes it essentially monitor itself, using an async loop started on the first enqueue that checks if the task currently running is the same as what was running on the last interval. If so, log the error.
Currently in the .NET client we serialize invoking user callbacks upon receiving messages from the server using a
TaskQueue. This includes callbacks registered usingHubProxy.Onor continuations afterHubProxy.Invoke.If these callbacks block, especially blocking waiting on result from another callback, the receive dispatch queue will simply stop (deadlock).
We should detect this condition and trace an error when it occurs (
Connection.OnError).We could do this in the
TaskQueueitself (with an optional flag that enables it of course) that makes it essentially monitor itself, using an async loop started on the first enqueue that checks if the task currently running is the same as what was running on the last interval. If so, log the error.