Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for removeCallback (0.25 sec)

  1. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/parameters/BuildCancellationTokenAdapter.java

        public boolean addCallback(Runnable cancellationHandler) {
            return cancellationToken.addCallback(cancellationHandler);
        }
    
        @Override
        public void removeCallback(Runnable cancellationHandler) {
            cancellationToken.removeCallback(cancellationHandler);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  2. platforms/core-runtime/launcher/src/main/java/org/gradle/tooling/internal/provider/InternalCancellationTokenAdapter.java

        public boolean addCallback(Runnable cancellationHandler) {
            return cancellationToken.addCallback(cancellationHandler);
        }
    
        @Override
        public void removeCallback(Runnable cancellationHandler) {
            cancellationToken.removeCallback(cancellationHandler);
        }
    
        @Override
        public void cancel() {
            throw new UnsupportedOperationException();
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. subprojects/core/src/main/java/org/gradle/initialization/DefaultBuildCancellationToken.java

                }
            }
            if (returnValue) {
                cancellationHandler.run();
            }
            return returnValue;
        }
    
        @Override
        public void removeCallback(Runnable cancellationHandler) {
            synchronized (lock) {
                callbacks.remove(cancellationHandler);
            }
        }
    
        @Override
        public void cancel() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 10:39:11 UTC 2019
    - 2.4K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/main/java/org/gradle/initialization/BuildCancellationToken.java

        boolean addCallback(Runnable cancellationHandler);
    
        /**
         * Removes a callback called when cancellation request happens.
         *
         * @param cancellationHandler removed callback.
         */
        void removeCallback(Runnable cancellationHandler);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/InternalCancellationToken.java

        /**
         * Removes a callback from a set of handlers called when cancel is requested.
         *
         * @param cancellationHandler removed callback.
         */
        void removeCallback(Runnable cancellationHandler);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 13:57:30 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/client/DaemonCancelForwarder.java

                }
            };
        }
    
        public void start() {
            cancellationToken.addCallback(cancellationCallback);
        }
    
        @Override
        public void stop() {
            cancellationToken.removeCallback(cancellationCallback);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  7. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/steps/CancelExecutionStep.java

            Runnable interrupt = thread::interrupt;
            try {
                cancellationToken.addCallback(interrupt);
                return delegate.execute(work, context);
            } finally {
                cancellationToken.removeCallback(interrupt);
                if (cancellationToken.isCancellationRequested()) {
                    Thread.interrupted();
                    throw new BuildCancelledException("Build cancelled while executing " + work.getDisplayName());
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:33 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  8. platforms/core-execution/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonClientCancellationHandler.java

                buildCancellationToken.addCallback(cancellationCallback);
            }
        }
    
        @Override
        public void stop() {
            if (started.compareAndSet(true, false)) {
                buildCancellationToken.removeCallback(cancellationCallback);
            }
        }
    
        @NonNullApi
        private class KillWorkers implements Runnable {
            @Override
            public void run() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 30 19:57:50 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. platforms/core-runtime/launcher/src/main/java/org/gradle/tooling/internal/provider/continuous/ContinuousBuildTriggerHandler.java

                }
            } catch (InterruptedException e) {
                throw UncheckedException.throwAsUncheckedException(e);
            } finally {
                cancellationToken.removeCallback(cancellationHandler);
            }
        }
    
        public boolean hasBeenTriggered() {
            return changeArrived;
        }
    
        public void notifyFileChangeArrived() {
            changeArrived = true;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  10. subprojects/core/src/test/groovy/org/gradle/initialization/DefaultBuildCancellationTokenSpec.groovy

        }
    
        def 'removed callback is not notified'() {
            def token = new DefaultBuildCancellationToken()
    
            def callback = Mock(Runnable)
            token.addCallback(callback)
            token.removeCallback(callback)
    
            when:
            token.cancel()
    
            then:
            token.cancellationRequested
            0 * callback.run()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 23 09:27:48 UTC 2015
    - 3.7K bytes
    - Viewed (0)
Back to top