New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semaphore #754

merged 3 commits into from Oct 30, 2018


None yet
1 participant

alexandru commented Oct 28, 2018


  • monix.execution.AsyncSemaphore
    • moved it from monix.execution.misc to the root monix.execution
    • changed its interface and its implementation to be consistent with cats.effect.concurrent.Semaphore
  • monix.eval.TaskSemaphore
    • removed, being replaced by a new generic implementation in monix-catnap
  • monix.catnap.Semaphore[F]
    • added as a new generic implementation working with Concurrent[F] OrElse Async[F]
    • implements cats.effect.concurrent.Semaphore
    • adds extra goodies:
      • withPermitN(n)(fa)
      • awaitAvailable(n: Long): this being the replacement for awaitAllReleased in TaskSemaphore, but having a different semantic due to the changes related to the interface inherited from cats.effect
      • usage of Monix's own atomic references with a configurable PaddingStrategy

The implementation between AsyncSemaphore and Semaphore[F] is common of course, which makes it a reason enough for Semaphore[F] to exist in Monix long term.

@alexandru alexandru added this to the 3.0.0-RC2 milestone Oct 28, 2018


This comment has been minimized.

codecov bot commented Oct 28, 2018

Codecov Report

Merging #754 into master will decrease coverage by 0.17%.
The diff coverage is 87.09%.

@@            Coverage Diff             @@
##           master     #754      +/-   ##
- Coverage   90.52%   90.35%   -0.18%     
  Files         405      407       +2     
  Lines       11487    11558      +71     
  Branches     2116     2133      +17     
+ Hits        10399    10443      +44     
- Misses       1088     1115      +27

@alexandru alexandru force-pushed the alexandru:semaphore branch from 1e534e8 to cc25b21 Oct 29, 2018

alexandru added some commits Oct 29, 2018

@alexandru alexandru merged commit 1afaaa9 into monix:master Oct 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment