I’m currently working on the async operations for the next release of Xceed FTP for .NET. Basically, the library will now offer a series of <b>BeginSomething/EndSomething</b> pair, following the .NET Framework guidelines regarding <b>IAsyncResult</b> and asynchroneous operations.
But questions are raised with this. Should I use <b>BeginInvoke</b> (so make events not block the underlying code) as often as possible (i.e. when the event has only “in” params)? Or should I always use <b>Invoke</b>, so everything seems synchronized? Or is this property plainly useless, and you guys prefer to handle UI thread affinity yourself? Is it right to marshall both events and completion callbacks with that property? Or would you expect it to marshall only events? And the final question for those of you developping UI applications: have you ever heard of all the above, or is it all news to you, and you weren’t aware you had to make sure to call controls and the form from the main thread?
Thank you for all your comments! 😀
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Martin (had 4153 views)