[Mono-dev] [PATCH] Add async to dmcs

Alex Corrado alexander.corrado at gmail.com
Thu Nov 18 15:44:37 EST 2010

As a starting point, I've added the "async" method modifier to dmcs, which
will be recognized when "-langversion:Future" is passed. This is my first
foray into the mcs codebase and I just want to make sure I'm on the right
track before going much further.

The patch is attached and also applied at https://github.com/nirvanai/mono.

Thanks for your time with this.


On Tue, Nov 16, 2010 at 10:14 AM, Marek Safar <marek.safar at gmail.com> wrote:

I just noticed this thread, and I'm curious, when you say:

 The async/await is about asynchrony and spawn/sync is about parallelism.
> These are 2 different things which should not be mixed together.
Do you mean they should not be confused, or do you literally mean that these
technologies (or paradigms, if you will) should not be combined? If this is
the case, I'm curious to learn why you say that, since I'm toying with idea
of hybrid threading for a concurrency framework I'm working on (

I don't see any problem combining these two together when needed, my point
was simply that they mean 2 different things.

Mono C# compiler has no async support yet (the .NET preview has been
> announced few days ago!) but we are fully aware of it and we will
> implement it as soon as time permits.

I implemented async methods (before I knew they were to be a language
feature) using Cecil for the framework I mentioned. I think the coroutine
transformation I'm doing is pretty similar to the way Microsoft is doing
things in their async preview. I'd certainly be willing to take a stab at
adding async support to the Mono C# compiler if/when you think that might be

Patches are always welcomed. However, the approach will be different as the
rewrite will happen at expression level (you don't need Cecil).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101118/1425262e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmcs_add_async_keyword.patch
Type: application/octet-stream
Size: 1737 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101118/1425262e/attachment-0001.obj 

More information about the Mono-devel-list mailing list