DefaultListenerManagerTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Reacquire project lock after work items in order to invoke TaskActionListener

    • -0
    • +31
    ./DefaultListenerManagerTest.groovy
  1. … 7 more files in changeset.
Reacquire project lock after work items in order to invoke TaskActionListener

    • -0
    • +31
    ./DefaultListenerManagerTest.groovy
  1. … 6 more files in changeset.
Reacquire project lock after work items in order to invoke TaskActionListener

    • -0
    • +31
    ./DefaultListenerManagerTest.groovy
  1. … 6 more files in changeset.
spelling: peculiar

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Use ConcurrentHashMap to avoid concurrent issues

Fix https://github.com/gradle/gradle-private/issues/1031

This PR replace original Map in DefaultListenerManager with ConcurrentHashMap

to avoid concurrent access issue. A test is added to reproduce the issue.

    • -0
    • +23
    ./DefaultListenerManagerTest.groovy
  1. … 1 more file in changeset.
Fix race condition when removing listeners

    • -0
    • +92
    ./DefaultListenerManagerTest.groovy
  1. … 1 more file in changeset.
Improved collection of multiple listener notification errors, for improved error reporting. Also avoid creating a garbage `ArrayList` on each event, when the event succeeds (which they almost always do).

    • -4
    • +54
    ./DefaultListenerManagerTest.groovy
  1. … 4 more files in changeset.
Fixed ListenerManager implementation wrt a listener that implements multiple listener interfaces and concurrent event generation.

    • -18
    • +80
    ./DefaultListenerManagerTest.groovy
  1. … 1 more file in changeset.
Changed the contract of ListenerManager to tighten up behaviour for adding and removing listeners while events are being generated, and fixed the implementation. Also changed implementation to fail when a listener generates events of the same type that it receives.

    • -2
    • +251
    ./DefaultListenerManagerTest.groovy
  1. … 4 more files in changeset.
Changed the contract of ListenerManager to tighten up behaviour when events are generated concurrently.

- Events are delivered listeners of a given type by a single thread at a time.

- Events are delivered in the same order to all listeners of a given type.

Implementation is currently a little rough.

    • -0
    • +452
    ./DefaultListenerManagerTest.groovy
  1. … 6 more files in changeset.