Python/Erlang: What’s the difference between Twisted, Stackless, Greenlet, Eventlet, Coroutines? Are they similar to Erlang processes?

First of all, non-blocking I/O has nothing in common with green threads or coroutines, but it can affect how they’re scheduled. Now: Twisted is a classic non-blocking I/O framework — application code is written in async style using callbacks. Gevent and eventlet use the greenlet library for coroutines/greenthreads/greenlets. There is one dedicated greenlet for running … Read more

Garbage collection and memory management in Erlang

To classify things, lets define the memory layout and then talk about how GC works. Memory Layout In Erlang, each thread of execution is called a process. Each process has its own memory and that memory layout consists of three parts: Process Control Block, Stack and Heap. PCB: Process Control Block holds information like process … Read more

Erlang/OTP behaviors for beginner

Rather than try to address your specific questions as other answers have already done, I’ll try to explain in simple terms the basics behind behaviors, and let you answer your own questions based on understanding those basics. A behavior is basically a message handling framework, where by “framework” I mean the classical definition of a … Read more