harmony-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/HARMONY-5801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596310#action_12596310
] 

Ilya Berezhniuk commented on HARMONY-5801:
------------------------------------------

I still cannot reproduce the bug at all.
I checked the test on Linux x86 and x86_64, it does not fail on ~1000 tries for both debug
and release on SuSE.

Pavel, could you help with reproducing?
What platform should I use?

> [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