From 4702a9107f836ad299bc047201ea868497143a9e Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Tue, 21 Nov 2023 17:56:08 -0500 Subject: [PATCH] Virtual threads Signed-off-by: Eric Deandrea --- grpc-locations/pom.xml | 3 +-- .../sample/superheroes/location/grpc/LocationGrpcService.kt | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/grpc-locations/pom.xml b/grpc-locations/pom.xml index 6841013ef4..1e357ef219 100644 --- a/grpc-locations/pom.xml +++ b/grpc-locations/pom.xml @@ -1,6 +1,6 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 io.quarkus.sample.super-heroes grpc-locations @@ -157,7 +157,6 @@ maven-surefire-plugin ${surefire-plugin.version} - -Djdk.tracePinnedThreads org.jboss.logmanager.LogManager ${maven.home} diff --git a/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt b/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt index 5125f878d5..133fffdff9 100644 --- a/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt +++ b/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt @@ -8,12 +8,10 @@ import io.quarkus.sample.superheroes.location.grpc.LocationsGrpc.LocationsImplBa import io.quarkus.sample.superheroes.location.mapping.LocationMapper import io.quarkus.sample.superheroes.location.service.LocationService import io.smallrye.common.annotation.Blocking -import io.smallrye.common.annotation.RunOnVirtualThread @GrpcService class LocationGrpcService(private val locationService: LocationService) : LocationsImplBase() { @Blocking - @RunOnVirtualThread override fun getRandomLocation(request: RandomLocationRequest?, responseObserver: StreamObserver?) { Log.debug("Requesting a random location") returnLocationOrError(this.locationService.getRandomLocation(), responseObserver) @@ -21,7 +19,6 @@ class LocationGrpcService(private val locationService: LocationService) : Locati } @Blocking - @RunOnVirtualThread override fun getLocationByName(request: GetLocationRequest?, responseObserver: StreamObserver?) { if (request != null) { Log.debug("Getting location ${request.name}") @@ -32,7 +29,6 @@ class LocationGrpcService(private val locationService: LocationService) : Locati } @Blocking - @RunOnVirtualThread override fun replaceAllLocations(request: LocationsList?, responseObserver: StreamObserver?) { if (request != null) { Log.debug("Replacing all locations") @@ -47,7 +43,6 @@ class LocationGrpcService(private val locationService: LocationService) : Locati } @Blocking - @RunOnVirtualThread override fun getAllLocations(request: AllLocationsRequest?, responseObserver: StreamObserver?) { val allLocations = this.locationService.getAllLocations() Log.debug("Got all locations: $allLocations") @@ -60,7 +55,6 @@ class LocationGrpcService(private val locationService: LocationService) : Locati } @Blocking - @RunOnVirtualThread override fun deleteAllLocations(request: DeleteAllLocationsRequest?, responseObserver: StreamObserver?) { Log.debug("Deleting all locations")