Skip to content
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

Port java.util.concurrent.locks types from JSR-166 #3130

Merged

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Feb 3, 2023

This change ports API and tests for following java.util.concurrent.locks types:

  • AbstractOwnableSynchronizer
  • AbstractQueuedSynchronizer
  • AbstractQueuedLongSynchronizer
  • Condition
  • Lock
  • ReadWriteLock
  • ReentrantLock
  • ReentrantReadWriteLock

It also adds mocks for ForkJoinPool.ManagedBlocker required by implementation of mentioned types
Also ports types used in tests and based on AbstractQueueSynchronizer:

  • java.util.concurrent.CountDownLatch
  • java.util.CyclicBarrier

Additional changes:

  • Moved concurrent.atomic test sources to correct directory
  • Added missing LockSupportTest for already implemented LockSupport
  • Fixed name clashes for assertThrows method defined in JSR166, renamed it to assertEachThrows
  • Removed existing Scaladoc comments for java.util.concurrent.locks due to large effort in making them compile (missing symbols due to malformed comments caused by formatting or not being implemented yet, compiler failures when generating Scaladoc)

@WojciechMazur WojciechMazur merged commit 52ef2d4 into scala-native:main Feb 3, 2023
@WojciechMazur WojciechMazur deleted the feature/multithreading-juc-locks branch February 3, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant