WaitAll with threadpool [英] WaitAll with threadpool

查看:103
本文介绍了WaitAll with threadpool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

这里是我的问题(我已经搜索了几天而且无法获得
找到解决方案)


我要创建一堆邮件,所以我想在一个

线程池中排队工作(我已经可以做了),但是一旦所有工作排队,我想要等待所有邮件产生的主要线程



到目前为止我还没找到怎么做因为线程池没有提供

一个改编的WaitAll方法。

有人可以帮忙吗?

谢谢

解决方案

嗨Shad

\\\\

Threading.Thread.Sleep(10000) ''10秒

/////

我希望这有点帮助吗?

Cor


" COR'QUOT; < no*@non.com>在新闻中写道:3f7a9ba9


0


Hello,
here''s my problem (I''ve been searching for a fews days already and couldn''t
find a solution)

I''ve got a bunch of mails to create, so I''d like to queue jobs in a
threadpool (which I can do already), but once all jobs are queued, I''d like
the main thread to wait until all mails are generated.
So far I haven''t found how to do that, since the threadpool doesn''t provide
an adapted WaitAll method.
Could anyone help please ?
Thanks

解决方案

Hi Shad
\\\\
Threading.Thread.Sleep(10000) '' 10 seconds
/////
I hope this helps a little bit?
Cor


"Cor" <no*@non.com> wrote in news:3f7a9ba9


0


这篇关于WaitAll with threadpool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆