digitalmars.D.learn - Runtime termination hook?
- Jacob Carlborg (4/4) Sep 25 2012 Is there an event that I can hook into which is called when the runtime
- Sean Kelly (3/4) Sep 25 2012 terminated?
- Jacob Carlborg (6/7) Sep 25 2012 Didn't think of that. When exactly are those run? I'm looking for
- Steven Schveighoffer (3/6) Sep 27 2012 https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dm...
- Steven Schveighoffer (5/12) Sep 27 2012 I guess here too:
- Jacob Carlborg (5/7) Sep 27 2012 Yeah, I guess that looks close enough. BTW, "main" should really use
Is there an event that I can hook into which is called when the runtime is terminated? -- /Jacob Carlborg
Sep 25 2012
On Sep 25, 2012, at 12:44 PM, Jacob Carlborg <doob me.com> wrote:Is there an event that I can hook into which is called when the runtime is=terminated? A shared static dtor?=
Sep 25 2012
On 2012-09-26 07:37, Sean Kelly wrote:A shared static dtor?Didn't think of that. When exactly are those run? I'm looking for something corresponding to this Java method: http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Runtime.html#addShutdownHook%28java.lang.Thread%29 -- /Jacob Carlborg
Sep 25 2012
On Wed, 26 Sep 2012 02:16:31 -0400, Jacob Carlborg <doob me.com> wrote:On 2012-09-26 07:37, Sean Kelly wrote:https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L319 -SteveA shared static dtor?Didn't think of that. When exactly are those run?
Sep 27 2012
On Thu, 27 Sep 2012 08:03:39 -0400, Steven Schveighoffer <schveiguy yahoo.com> wrote:On Wed, 26 Sep 2012 02:16:31 -0400, Jacob Carlborg <doob me.com> wrote:I guess here too: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L549 -SteveOn 2012-09-26 07:37, Sean Kelly wrote:https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L319A shared static dtor?Didn't think of that. When exactly are those run?
Sep 27 2012
On 2012-09-27 14:04, Steven Schveighoffer wrote:I guess here too: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L549Yeah, I guess that looks close enough. BTW, "main" should really use "rt_term" and "rt_init" instead of duplicating the code. -- /Jacob Carlborg
Sep 27 2012