Few questions about concurrency

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 27 08:36:10 PDT 2016


>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?


More information about the Digitalmars-d-learn mailing list