Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is no need to deprecate anything. No migration is needed.

Test Plan

Background Color
coloryellow

INPUT NEEDED

As far as the author is aware, there are currently no (integration) Unit tests are sufficient. The first step is to find or write tests that test the current thread-id check. If there would be, these should continue to pass. In addition, they could be extended to support the additional behavior.Regardless, testing can be fully covered by unit tests.based locking. These test must continue to work with the proposed locking. The next step is to add more unit tests to verify the new behavior.

Unit tests to test thread-id based locking:

  • in callback, invoking consumer from the same thread is allowed
  • in callback, invoking consumer from a different thread is rejected

Additional unit tests:

  • in callback, invoking consumer from a different thread is allowed when access key is provided
  • in callback, invoking consumer concurrently from multiple threads is rejected even when access key is provided

Rejected Alternatives

Alternative A: add a configuration to disable the thread-id check

...