harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Salikh Zakirov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2219) [drlvm][thread] fix Thread.start() waiting to prevent losing interruption
Date Mon, 04 Dec 2006 13:40:22 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-2219?page=comments#action_12455306 ] 
            
Salikh Zakirov commented on HARMONY-2219:
-----------------------------------------

Understood and agreed.
The other relevant reference on why whould we wait for the thread be really started is from
isAlive() specification:

   ... A thread is alive if it has been started and has not yet died. ...

This implies, that thread is *required* to be alive after method start() returned.
And since we define "being alive" as "user function run() was called but not yet returned
or terminated by exception", this implies that start()
must wait until the thread status has been changed to be alive, just before calling run()
function.

Concerning the loosing interruption, the issue HARMONY-2366 describes how it affects ThreadTest
from luni module of classlib unit tests.

> [drlvm][thread] fix Thread.start() waiting to prevent losing interruption
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2219
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2219
>             Project: Harmony
>          Issue Type: Sub-task
>            Reporter: Salikh Zakirov
>         Attachments: fix-thread-start.patch
>
>
> This is a splitted out part of H-1789.patch from HARMONY-1789, originally posted by Nikolay
Kuznetsov.
> fix-thread-start.patch fixes Thread.start() to remember interrupted status if interruptions
occur while it waits for the other thread to start,
> and restore interrupted status before returning.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message