[Mono-list] Intrinsicly Non-Portable?

Miguel de Icaza miguel@ximian.com
23 Nov 2001 17:00:03 -0500


>   Has anyone given any thought to how we might deal with issues which
> are intrinsically non-portable? By way of example, allow me to offer
> two items.

Those particular examples are part of the IO layer that the .NET classes
require, and as such Dick has implemented such a layer in Mono that
emulates precisely the Win32 IO model.

It is part of mono/mono/io-layer.

> System.Threading.WaitHandle.WaitAny()
> 	This method exposes the functionality associated with the Win32
> call:  ::WaitForMultipleObjectsEx(). This call allows a thread to
> block against a wide variety of objects: semaphores, mutexes,
> threads, events, and so on. If any or all of those objects move to
> the signaled state, then the function returns. POSIX, in my
> experience, has no analog.

This was actually the reason why Dick started the IO-layer to cope with
this particular problem.   During the design phase, Dick had to learn
everything he wanted to know or was afraid to ask about the Win32 IO
layer and we are happy to report that this is handled just fine by mono
;-)

>   Needless to say, the .NET Framework betrays its parentage, and I
> was wondering how people had planned to deal with this under the
> various Unix platforms.

It has been taken care of.  I personally really like the concept behind
WaitAny.  Its basically the file descriptor concept from Unix taken to
the next level.  It is really nice.

Share the love,
Miguel.