Hi,<br><br>I&#39;m developing a small open source application in C#, it&#39;s suppose to run on both Windows, Linux og OS X. Using Windows.Forms, Gtk# and Cocoa# respectively. <br>To make this easier I&#39;m writing a .dll library to contain 99% of the program logic. Also enabling other projects to reuse some of the code...
<br><br>Now, I want to download a lot of things asynchronously in this library, and since both Windows.Forms and Gtk# isn&#39;t thread safe (don&#39;t know about Cocoa#) I have to make sure that my file downloaded event is executed on the main thread...
<br><br>I&#39;ve seen people do this with BackgroundWorker or SynchronizationContext/AsyncOperationsManager, an article here:<br><a href="http://www.julmar.com/blog/mark/PermaLink,guid,78805871-cb7b-4ea4-9be8-a8a1d61a15d8.aspx">
http://www.julmar.com/blog/mark/PermaLink,guid,78805871-cb7b-4ea4-9be8-a8a1d61a15d8.aspx</a><br><br>But how can I make any of these work under Gtk#, I don&#39;t want to handle the thread invocation in my GUI frontends with 
Windows.Forms.Form.BeginInvoke(), Gtk.Application.Invoke() and whatever is used in Cocoa#... This wouldn&#39;t be nice to other thirdparty developers who might want to reuse some of my code either...<br><br>So how can I host a 
ComponentModel.IComponent correctly i a Gtk# application? if possible? Is there anyother solution I&#39;ve missed?<br>The only reasonable solution I&#39;ve seen is to takeover the main loop, but that&#39;s just a plain ugly hack :)
<br clear="all"><br>Hope somebody is able to help me, if it this is impossible it&#39;s never going to be easy to write cross platform applications with mono...<br><br>-- <br>Regards Jonas Finnemann Jensen.