处理 Eclipse Jobs 时是否有与 Thread.sleep 等效的方法?
我正在编写 Eclipse 插件,其中有很多正在运行的作业。
在某些情况下,我希望作业在当前执行点“休眠”一段时间并从该位置继续(而不是重新安排作业并从头开始)。
我的理解是,在 Eclipse 作业中使用 Thread.sleep 是相当不推荐的。
有没有可以接受的替代方案来实现这一目标?
I am writing Eclipse plugins where there are quite a few running jobs.
In some cases, I want the job to "sleep" for a while at the current point of execution and continue from that spot (rather than reschedule the job and start it from scratch).
My understanding is that using Thread.sleep within Eclipse jobs is quite deprecated.
Is there an acceptable alternative to accomplishing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你最好的选择可能是重新安排工作并从上次中断的地方继续。 就像是:
I think your best bet may be to reschedule the job and pick up where you left off. Something like: