Comments (6)
新版本里是使用独立的线程池的,且可以换掉。
from solon.
通过它设定:
RunUtil.setExecutor(...)
from solon.
@noear @async注解,根据不同的设定,使用不同的线程池呢?
from solon.
“根据不同的设定,使用不同的线程池呢?”。这个没有直接支持。有几个建议:
- 最好是不用它。如果不是有特别的场景,它真不是个好东西。(一般来讲,用分布式事件替代更好)
- 目前提供有一个机制,可以实现这个效果:定义个组件类实现 InvocationRunnableFactory 接口,create 函数要返回为 null(这样就不会用内部的线程池了,而是自己解决掉)
- 可以替换这个注解的拦截处理 “context.beanInterceptorAdd”,这样就可以搞成自己想要的样子
from solon.
下版支持更自由的定制方式
from solon.
新版本,已经支持较友好的定制了(可以实现这个需求):
https://solon.noear.org/article/570
from solon.
Related Issues (20)
- org.noear.solon.core.util.ClassUtil::loadClass 异常捕获新增NoClassDefFoundError捕获 HOT 1
- Com1、Com2 为 Windows 保留文件名,使用该命名会导致 Windows 下文件不可操作 HOT 2
- 任务发放:为 solon.boot.jdkhttp, jlhttp, smarthttp 定义统一的文件处理接口并优化 HOT 2
- 任务发放:优化 solon.boot.jetty 的文件上传,支持磁盘方案 HOT 2
- 任务发放:优化 solon.boot.undertow 的文件上传 HOT 1
- 支持使用命令行设置 构建 native image args HOT 4
- 测试用例建议使用h2数据库 HOT 1
- 测试模块支持断言native metadata HOT 1
- 任务发放:分离 websocket 和 socketd 的接口。用户层面更清爽 HOT 1
- 任务发放:添加 openapi3 的文档适配
- 建议将官方文档放到 git 上维护 HOT 3
- 希望文档增加gradle相关的配置,感谢 HOT 2
- A new RCE vulnerability HOT 3
- org.noear.solon.net.websocket.WebSocket 无法获取唯一识别的一个key HOT 5
- solon-openapi2-knife4j HOT 8
- BUG: java.lang.NoClassDefFoundError: org/noear/socketd/utils/Utils HOT 3
- Auth 中 exclude的参数疑问 HOT 11
- Idea中测试时,日志输出混合问题 HOT 9
- 任务发放:websocket 接口增加支持 stomp 和 sockjs 支持! HOT 1
- smart-doc-maven-plugin 文档最下方的连接失效了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solon.