3 ms·
Just 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?
by ngrilly 10y ago
Just 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...