3 ms·
Not out of the box, but this library does exactly that (with lots of functional niceness too). Disclaimer, I wrote it, so I'm obviously biased https://github.
by louthy 10y ago
Not out of the box, but this library does exactly that (with lots of functional niceness too). Disclaimer, I wrote it, so I'm obviously biased
https://github.com/louthy/language-ext https://github.com/louthy/language-ext
- ngrilly 10y agoJust had a cursory look at the README. Is each lightweight process mapped to an OS thread? What is the minimal memory used by each lightweight process?
- louthy 10y agoIt wraps the F# MailboxProcessor mentioned in a comment above. A thread is only allocated when a message is processed, and then free'd up afterwards. So there's no permanent thread overhead and 100,000s can be created. The overhead in terms of memory is the internal state of each Process + the user's Process state. To see the internal overhead, check out the member variables for the Actor class [1]. It's pretty lightweight, although could probably shave a few bytes here and there. [1] https://github.com/louthy/language-ext/blob/master/LanguageExt.Process/ActorSys/Actor.cs https://github.com/louthy/language-ext/blob/master/LanguageE...