[dmd-concurrency] shutting down
Andrei Alexandrescu
andrei at erdani.com
Wed Jan 20 13:00:22 PST 2010
Michel Fortin wrote:
> Le 2010-01-20 à 15:24, Andrei Alexandrescu a écrit :
>
>> I think threads shouldn't be able to do much during shutdown. For example I don't think they should suddenly open sockets. How about opening files? Or calling system()? Any ideas on a unified approach?
>
> Why do you think that?
I'm thinking, there are too many programs that hang when I want to end
them just because some thread inside is waiting for a socket. I think
that any operation that could block for an arbitrary amount of time
should be disallowed during shutdown.
What sockets library do today is, they offer a global close_library
function. Once that is called, all pending socket connections and all
new socket connections fail immediately.
Andrei
More information about the dmd-concurrency
mailing list