Message passing is an alternative to relying on globals + mutex's. In the end its implemented by a global + stack FIFO (mailbox).

Where it's better? Could you give an example?

Ring transition e.g. system calls are not all that expensive.
Its what the kernel does with that system call that is problematic to performance.

Not fully understand. In first sentence you are saing that is not expensive and in second you are saying about "kernel does with that system call that is problematic to performance"

For example vibed is based on Fibers. Does it's mean that:

void handleRequest(HTTPServerRequest req,
                   HTTPServerResponse res)
{
        if (req.path == "/")
                res.writeBody("Hello, World!", "text/plain");
}

is fiber-function?

Reply via email to