title: Embedded Mono: How to use 'mono_runtime_invoke' on different thread
body: <p>Hi i'm using Embedded Mono with NaCl.  Everything is working so far but idk how to invoke a .NET method from c thats not on the same thread as the .NET exe was executed on.</p>
  
  <p>Here is the method i'm trying to use:</p>
  
  <pre><code>void Mono_InvokeMethod(const char* assemblyName, const char* method, const char* arg)
  {
      MonoAssemblyName* man = mono_assembly_name_new(assemblyName);
      assert(man);
      MonoAssembly* ma = mono_assembly_loaded(man);
      assert(ma);
      MonoImage* mi = mono_assembly_get_image(ma);
      assert(mi);
      MonoMethodDesc* mmd = mono_method_desc_new(method, "Second.Program" /* include_namespace */);
      assert(mmd);
      MonoMethod* mm = mono_method_desc_search_in_image(mmd, mi);
      assert(mm);
      void *args[1];
      args[0] = mono_string_new(mono_get_domain(), arg);//mono_get_root_domain() &lt;&lt;&lt;&lt;&lt;&lt;&lt; Maybe use this instead
  
      mono_runtime_invoke(mm, NULL /* "this" object */, args, NULL /* exception */);
  }
  </code></pre>