February 03, 2015
https://issues.dlang.org/show_bug.cgi?id=3462

--- Comment #15 from hsteoh@quickfur.ath.cx ---
That skips any struct dtors that might be in scope, which could leak resources.

--
February 03, 2015
https://issues.dlang.org/show_bug.cgi?id=3462

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m

--- Comment #16 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Honestly, I think that this sort of thing should be left up to whatever program wants to attempt it. It's _not_ possible to do in the general case, because there's no way to tell all running threads to exit cleanly. They could be doing _anything_, including just sitting forever in while(1) {}. The only way for them to stop cleanly is to choose to stop cleanly. For that, we could signal them in some way, and then they could choose to shut down, but that requires that all threads have a common way of being signalled to shut down and that they're paying attention to it. And I don't think that that works very well, even if you assume that all threads are using std.concurrency (which is a big assumption), because unless the threads specifically handles that exception being thrown from receive, then who knows what they're going to do. It depends entirely on what the code looks like. Heck, they could be using std.parallelism rather than std.concurrency without even using core.thread.Thread directly and still not be using std.concurrency's receive or receiveOnly.

If a program is written with the idea that each thread can be signalled to shut down, then it becomes possible to tell all threads to shut down cleanly, but the code has to be written with that in mind. I don't see how a standard solution makes any sense for that - especially when you consider the high risk that folks will misunderstand it and misuse it - especially if its usage is as simple as exitCleanly() - and that's assuming that we can even do it in the first place.

So, I say that we should just leave it up to programs to do this themselves. There is no silver bullet here. And it's not like std.concurrency needs something baked in to be able to do it in your program either. You can just create your own message that your receive calls expect which indicates to a thread that it should shut itself down. Then when you want to shut down, you signal all threads with that message and let them shut down.

--
June 04, 2015
https://issues.dlang.org/show_bug.cgi?id=3462

naptime <naptimeentertainment@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |naptimeentertainment@gmail.
                   |                            |com

--
June 10, 2015
https://issues.dlang.org/show_bug.cgi?id=3462

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.035                       |D2

--
October 14, 2016
https://issues.dlang.org/show_bug.cgi?id=3462

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bootcamp
                 CC|                            |andrei@erdani.com

--
December 22, 2016
https://issues.dlang.org/show_bug.cgi?id=3462

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|sean@invisibleduck.org      |alexandru.razvan.c@gmail.co
                   |                            |m

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=3462

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--
1 2
Next ›   Last »