Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获取每个线程的执行结果以及如何知道我这批次任务何时完成呢? #10

Open
chunfytseng opened this issue Sep 3, 2018 · 1 comment

Comments

@chunfytseng
Copy link

比如做成接口的时候前端请求一个任务,等待任务完成返回数据。

@zhangyingwei
Copy link
Owner

zhangyingwei commented Sep 4, 2018

因为任务的执行是异步的,所以这里无法等待任务完成返回数据。但是我提供一种方案: 每个任务生成一个唯一ID,然后任务提交之后阻塞等待,直到等到此任务的结果,然后返回数据,这样就会造成一种同步的假象。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants