harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-5801) [drlvm][thread][regression] Thread.yield intermittently does not work.
Date Tue, 13 May 2008 11:12:55 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Pervov closed HARMONY-5801.
---------------------------------


> [drlvm][thread][regression] Thread.yield intermittently does not work.
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-5801
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5801
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux
>            Reporter: Pavel Pervov
>
> The following test recently started to fail intermittently on DRLVM:
> class yield {
>     int tPass = 0;
>     class T extends Thread {
>         public void run() {
>             tPass++;
>         }
>     }
>     void test() {
>         T t = new T();
>         int numYields = 2000;
>         try {
>             t.setPriority(Thread.MAX_PRIORITY);
>             t.start();
>         } catch(Throwable e) {
>             System.out.println("Exception: " + e);
>         }
>         while(numYields > 0 && tPass == 0) {
>             numYields--;
>             Thread.currentThread().yield();
>         }
>         if(tPass == 0) {
>             System.out.println("FAILED");
>         } else {
>             System.out.println("PASSED");
>         }
>     }
>     public static void main(String[] args) {
>         new yield().test();
>     }
> }
> The test passes stably on RI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message