Fixes #104. Apparently Scala as of 3.4 catches the error of trying to synchronize on a primitive. This PR replaces the four occurrences of count.synchronized {...} with this.synchronized {...}, synchronizing on the whole instance, which is almost the same since all the types involved only have a single int field named count in all cases.
Fixes #104. Apparently Scala as of 3.4 catches the error of trying to synchronize on a primitive. This PR replaces the four occurrences of
count.synchronized {...}
withthis.synchronized {...}
, synchronizing on the whole instance, which is almost the same since all the types involved only have a singleint
field namedcount
in all cases.