Skip to content

Commit

Permalink
Fix some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Oct 31, 2024
1 parent a968ea2 commit cd1e7ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion temporal-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: "${logbackVersion}"
}

// Temporal SDK supports Java 8 or later so to support virutal threads
// Temporal SDK supports Java 8 or later so to support virtual threads
// we need to compile the code with Java 21 and package it in a multi-release jar.
sourceSets {
java21 {
Expand All @@ -49,6 +49,7 @@ tasks.named('compileJava21Java') {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(21)
}
options.release = 21
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public interface TaskHandler<TT> {
@Nonnull PollerOptions pollerOptions,
int workerTaskSlots,
boolean synchronousQueue,
boolean enableVirtualThreads) {
boolean useVirtualThreads) {
this.namespace = Objects.requireNonNull(namespace);
this.taskQueue = Objects.requireNonNull(taskQueue);
this.identity = Objects.requireNonNull(identity);
Expand All @@ -63,8 +63,8 @@ public interface TaskHandler<TT> {

this.pollThreadNamePrefix =
pollerOptions.getPollThreadNamePrefix().replaceFirst("Poller", "Executor");
//
if (enableVirtualThreads) {
// If virtual threads are enabled, we use a virtual thread executor.
if (useVirtualThreads) {
AtomicInteger threadIndex = new AtomicInteger();
this.taskExecutor =
VirtualThreadDelegate.newVirtualThreadExecutor(
Expand Down

0 comments on commit cd1e7ed

Please sign in to comment.