Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang-style light-weight processes in .NET

Is there any way to implement Erlang-style light-weight processes in .NET?

I found some projects that implement Erlang messaging model (actors model). For example, Axum. But I found nothing about light-weight processes implementation. I mean multiple processes that run in a context of a single OS-thread or OS-process.

like image 396
alexey Avatar asked Apr 12 '10 08:04

alexey


1 Answers

I think the F# MailboxProcessor is what you're looking for Alexey. Using the MailboxProcessor you can define tens of thousands of agents within one .NET process much like you can spawn tens of thousands of lightweight processes in Erlang.

This MSDN post by Don Syme is a great introduction.

If you're coming to .NET from an Erlang background keep in mind you're going to be missing lots of OTP goodies (supervisors, location transparency, mnesia, ...).

like image 105
Bryan Hunter Avatar answered Sep 22 '22 12:09

Bryan Hunter