[Mono-list] GUI, threads, etc...
Miguel de Icaza
miguel@ximian.com
Tue, 16 Mar 2004 14:26:40 -0500
Hello,
> <snip/>
> > btw: does mono have something like fork( ) or are Threads for this
> > purpose adequate use?
>
> A *direct* equivalent to fork(2)? No. The nearest equivalent is
> System.Diagnostics.Process, which is a fork(2)/exec(3) equivalent.
In Mono.Posix we do support "fork(2)", but be warned that forking a Mono
process might be more complicated than you think it is, so you are much
better off using Process.
>
> (Minor side question: what would happen if you P/Invoked out to fork(2)
> in libc.so? Is it safe for managed apps to do that?)
>
> I don't think fork(2) would be useful for automatically updating a
> TreeView, as you'd be creating a new process, duplicating the entire
> address space (*including* the TreeView, and everything else), and
> preventing the child process from modifying the TreeView of the parent
> process (as it's in a different address space).
>
> So threads are probably what you want anyway, unless I'm
> misunderstanding what you're asking.
>
> - Jon
>
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
--
Miguel de Icaza <miguel@ximian.com>