Re: AssertionError on barrier addWaiter
Philip Aston <[email protected]> Sun, 23 Feb 2020 17:59:22 +0000
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <[email protected]> |
See the BarrierGroup javadoc for the invariant enforced by this assertion.
On 20/02/2020 08:54, das888 wrote:
> As per code snippet:
> @Override public void addWaiter(BarrierIdentity barrierIdentity)
> throws CommunicationException {
>
> synchronized (this) {
> checkValid();
>
> if (m_barriers == 0) {
> throw new IllegalStateException("Can't add waiter, no barriers");
> }
>
> if (m_waiters.size() >= m_barriers) {
> throw new AssertionError(toString());
> }
>
> m_waiters.add(barrierIdentity);
> }
> }
> when number of total waiting threads reached to the barriers it throws
> assertion error.
> ------------------------------------------------------------------------