October 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11378



--- Comment #9 from Martin Krejcirik <mk@krej.cz> 2013-10-30 22:23:11 CET ---
(In reply to comment #7)
> You shouldn't call exit in your thread but simply break the infinite loop.

OK, that's probably workable, would be nice if there was some function to correctly exit the thread at any moment, though. Case closed for me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 31, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11378



--- Comment #10 from Walter Bright <bugzilla@digitalmars.com> 2013-10-30 20:19:42 PDT ---
Not sure - is this fixed or not for 2.064?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 31, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11378


Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #11 from Martin Nowak <code@dawg.eu> 2013-10-30 23:10:27 PDT ---
(In reply to comment #9)
> OK, that's probably workable, would be nice if there was some function to correctly exit the thread at any moment, though. Case closed for me.

Exiting a thread is different from exiting the process and even that would require more for a correct shutdown than C's exit function.

The only mechanism that we have which could correctly unwind a stack and free all resources is throwing an Exception. What's your use-case for this?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 31, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11378


Jacob Carlborg <doob@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob@me.com


--- Comment #12 from Jacob Carlborg <doob@me.com> 2013-10-31 00:29:11 PDT ---
(In reply to comment #11)

> Exiting a thread is different from exiting the process and even that would require more for a correct shutdown than C's exit function.
> 
> The only mechanism that we have which could correctly unwind a stack and free all resources is throwing an Exception. What's your use-case for this?

Can't we setup a callback using "atexit" which correctly terminates the runtime?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 31, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11378



--- Comment #13 from Martin Nowak <code@dawg.eu> 2013-10-31 07:50:45 PDT ---
(In reply to comment #12)
> Can't we setup a callback using "atexit" which correctly terminates the runtime?

No, because then we couldn't clean up the stack.
I still don't understand the need for this. I don't even know if a C program
can be terminated by a call to exit from another thread.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »