Hi *,

I have discovered that the Mono implementation of WebClient doesn't behave as described in this MSDN article:

https://msdn.microsoft.com/en-us/magazine/gg598924.aspx

Specifically all Async methods don't capure the current SynchronizationContext to later run the event handlers on it.

I can probably provide some patches but I don't know if there are plans to replace that code with the one MS open sourced.

As a side note, inspecting the code I found that in quite a lot of places Mono doesn't implement the "event handler" pattern correctly doing:

if (Event != null)
    Event(args);

instead of:

var e = Event;
if (e != null)
    e(args);

Are patches about this welcome?

federico

 --
Federico Di Gregorio                         federico.digrego...@dndg.it
Di Nunzio & Di Gregorio srl                               http://dndg.it
                      The number of the beast: vi vi vi. -- Delexa Jones
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to