www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 28] New: Documentation

reply d-bugmail puremagic.com writes:

           Summary: Documentation
           Product: D
           Version: unspecified
          Platform: PC
               URL: http://www.digitalmars.com/d/phobos/std_thread.html
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: braddr puremagic.com
        ReportedBy: benoit tionex.de

In the specification/doc of std.thread:

void wait();
    Wait for this thread to terminate. Throws ThreadError if the thread hasn't
begun yet or has already terminated or is called on itself.

The implementation does throw an exception if called on itself: OK
The implementation does throw an exception if pthread_join does not succeed: OK

But throwing an exception if the thread is allready terminated not implemented
nor would this be useful - you cannot check that the thread is running and be
sure that until calling the .wait, the thread does not terminate.

So, like it is implemented, wait should return without exception if the thread
is terminated.

Mar 09 2006
parent d-bugmail puremagic.com writes:

walter digitalmars.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

Mar 09 2006