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

Migrate to Java 21 #1248

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

warunalakshitha
Copy link
Contributor

Purpose

Examples

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

private static void invokeAsyncCall(UdpService udpService, DatagramPacket datagramPacket, Channel channel,
String methodName, Object[] params) {
Thread.startVirtualThread(() -> {
BObject service = udpService.getService();
Copy link
Contributor Author

@warunalakshitha warunalakshitha Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Dispatcher is call from non ballerina thread (UdpListenerHandler netty thread) We should not block any calls. So we have to use virtual thread

client.addNativeData(Constants.CONNECTIONLESS_CLIENT, udpClient);

return null;
return env.yieldAndRun(() -> {
Copy link
Contributor Author

@warunalakshitha warunalakshitha Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace markAsync with env.yieldAndRun and completableFuture for Ballerina extern functions

@warunalakshitha warunalakshitha merged commit 44d112e into ballerina-platform:java21 Oct 17, 2024
3 of 4 checks passed
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.

1 participant