eclipse-vertx / eclipse-vertx/vert.x

Vert.x 5 - Modularity Exposure / VertxThreadFactory

Open
#5,615 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
14.7k
Forks
2.1k
Avg merge
1d 10h
Merged PRs (30d)
27

Description

### Version

5.0.0

### Context

A code example for customizing the Thread creation instances, requires that VertxThread be exposed

```
public class InterceptingThreadFactory implements VertxThreadFactory {
private final boolean useVirtualThreadsForWorkers;

public InterceptingThreadFactory() {
this(true);
}

public InterceptingThreadFactory(boolean useVirtualThreadsForWorkers) {
this.useVirtualThreadsForWorkers = useVirtualThreadsForWorkers;
}

@Override
public void init(VertxBootstrap builder) {
if (builder.threadFactory() == null) {
builder.threadFactory(this);
}
}

@Override
public VertxThread newVertxThread(Runnable target, String name, boolean worker,
long maxExecTime, TimeUnit maxExecTimeUnit) {
}
}
```

In order to build - I need to expose the package which contains this class

```

org.apache.maven.plugins
maven-compiler-plugin
true



org.projectlombok
lombok
${lombok.version}



lombok.launch.AnnotationProcessorHider$AnnotationProcessor


true

--add-exports
io.vertx.core/io.vertx.core.impl=com.guicedee.vertx



```

:)

### Steps to reproduce

1. Create project with a module-info file
2. Create an Interceptor that extends, and override the default builder
3. Compile

### Do you have a reproducer?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.