Coder Social home page Coder Social logo

如何解决任务阻塞 about quartzui HOT 7 CLOSED

zhaopeiym avatar zhaopeiym commented on May 27, 2024
如何解决任务阻塞

from quartzui.

Comments (7)

zhaopeiym avatar zhaopeiym commented on May 27, 2024

如果你不需要等待执行结果,可以使用异步的方式。如:
Task.Run(()=> {
//原的的方法
});

from quartzui.

ghd258 avatar ghd258 commented on May 27, 2024

不太明白 ,您的这个项目里面能做个类似的案例吗

from quartzui.

zhaopeiym avatar zhaopeiym commented on May 27, 2024

你的问题的本质是不是 因为定时执行的任务时间过长?

from quartzui.

ghd258 avatar ghd258 commented on May 27, 2024

是的 比如五分钟一次运行 但是可能五分钟内无法完成本任务

from quartzui.

zhaopeiym avatar zhaopeiym commented on May 27, 2024

所以你可以把你的任务用异步的方式去做。

from quartzui.

ghd258 avatar ghd258 commented on May 27, 2024

就是请教你用异步怎么做 我们尝试过没有成功 您这里是否可以搞个异步的例子 学习一下

from quartzui.

zhaopeiym avatar zhaopeiym commented on May 27, 2024

异步的话就和这个工具没有关系了。
是在你的实现代码里面去把请求的方法做成异步。如果是.net 你可以了解下 Task.Run(()=> {});

from quartzui.

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.