Correctly lock shared counter
Trying to use channels
Removing buffer size since it's (apparently) not needed