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

Implement JDK-19 Thread API #3242

Merged
merged 12 commits into from Mar 30, 2023

Conversation

WojciechMazur
Copy link
Contributor

This PR implements JDK-19 Thread API including thread builders Thread.ofPlatform and Thread.ofVirtual along with other new methods.

  • Added join(Duration) and sleep(Duration) methods - these require third-party implementation of java.time.Duration.
  • Added stub for VirtualThread
  • Added Thread.ofPlatform and Thread.ofVirtual builders along with extensive set of tests
  • Fix multiple typos in deamon -> daemon
  • Fixed initialization of ThreadLocals allowing to support threads without ThreadLocal data in the future
  • Refactored Thread for easier integration with VirtualThreads in the future - extracted platform thread context to separate container
  • Add JDK compliance tests running with JDK 20 + --enable-preview flag

@WojciechMazur WojciechMazur merged commit 9864f50 into scala-native:main Mar 30, 2023
68 checks passed
@WojciechMazur WojciechMazur deleted the javalib/thread-builders branch March 30, 2023 18:30
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