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

Andi Huber updated CAUSEWAY-3972:
---------------------------------
    Description: 
Reproducer:
{code:java}
class _OneshotTest {
  final _Oneshot a = new _Oneshot();

  @Test void test() {        
       a.trigger(this::sayHelloOnce);    
  }

  @SneakyThrows void sayHelloOnce() {
      System.out.println("hello!");         
      var thread = new Thread(this::doMoreWork);
      thread.start();
      thread.join();    
  }

  void doMoreWork() {        
     a.trigger(this::sayHelloOnce);        
     System.out.println("more work");    
  }

}{code}

  was:
Reproducer:


{code:java}
class _OneshotTest {
    final _Oneshot a = new _Oneshot();

    @Test void test() {        
       a.trigger(this::sayHelloOnce);    
    }

    @SneakyThrows void sayHelloOnce() {
      System.out.println("hello!");         
      var thread = new Thread(this::doMoreWork);
      thread.start();
      thread.join();    
  }

  void doMoreWork() {        
     a.trigger(this::sayHelloOnce);        
     System.out.println("more work");    
  }

}{code}


> [Commons] Internal OneShot Util may deadlock
> --------------------------------------------
>
>                 Key: CAUSEWAY-3972
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3972
>             Project: Causeway
>          Issue Type: Bug
>          Components: Commons
>            Reporter: Andi Huber
>            Assignee: Andi Huber
>            Priority: Major
>             Fix For: 3.6.0, 4.0.0
>
>
> Reproducer:
> {code:java}
> class _OneshotTest {
>   final _Oneshot a = new _Oneshot();
>   @Test void test() {        
>        a.trigger(this::sayHelloOnce);    
>   }
>   @SneakyThrows void sayHelloOnce() {
>       System.out.println("hello!");         
>       var thread = new Thread(this::doMoreWork);
>       thread.start();
>       thread.join();    
>   }
>   void doMoreWork() {        
>      a.trigger(this::sayHelloOnce);        
>      System.out.println("more work");    
>   }
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to