Giter VIP home page Giter VIP logo

Comments (6)

noear avatar noear commented on June 16, 2024

新版本里是使用独立的线程池的,且可以换掉。

from solon.

noear avatar noear commented on June 16, 2024

通过它设定:

RunUtil.setExecutor(...)

from solon.

dudiao avatar dudiao commented on June 16, 2024

@noear @async注解,根据不同的设定,使用不同的线程池呢?

from solon.

noear avatar noear commented on June 16, 2024

“根据不同的设定,使用不同的线程池呢?”。这个没有直接支持。有几个建议:

  1. 最好是不用它。如果不是有特别的场景,它真不是个好东西。(一般来讲,用分布式事件替代更好)
  2. 目前提供有一个机制,可以实现这个效果:定义个组件类实现 InvocationRunnableFactory 接口,create 函数要返回为 null(这样就不会用内部的线程池了,而是自己解决掉)
  3. 可以替换这个注解的拦截处理 “context.beanInterceptorAdd”,这样就可以搞成自己想要的样子

from solon.

noear avatar noear commented on June 16, 2024

下版支持更自由的定制方式

from solon.

noear avatar noear commented on June 16, 2024

新版本,已经支持较友好的定制了(可以实现这个需求):

https://solon.noear.org/article/570

from solon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.