public static void listenInlineOnAllDone ( Runnable listener , ISynchronizationPoint < ? > ... synchPoints ) { JoinPoint < NoException > jp = new JoinPoint <> ( ) ; jp . addToJoin ( synchPoints . length ) ; Runnable jpr = new Runnable ( ) { @ Override public void run ( ) { jp . joined ( ) ; } } ; for ( int i = 0 ; i < synchPoints . length ; ++ i ) synchPoints [ i ] . listenInline ( jpr ) ; jp . start ( ) ; jp . listenInline ( listener ) ; }
Shortcut method to create a JoinPoint waiting for the given synchronization points start the JoinPoint and add the given listener to be called when the JoinPoint is unblocked . The JoinPoint is not unblocked until all synchronization points are unblocked . If any has error or is cancel the error or cancellation reason is not given to the JoinPoint in contrary of the method listenInline .