在服务器端运行线程&可以在客户端显示进度吗?
我想在服务器端运行一个线程池想要在客户端显示线程工作进度。这可能吗。如果是这样请指导我。提前致谢
I want to run a thread pool on server side & want to show threads work progress on client side. Is this possible. If so kindly guide me. thanx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,在主线程中检查更新(或由工作线程通知),然后通过 TCP 套接字发送报告进度(如果在同一台计算机上,则使用进程间通信)。
在客户端收到信息后对其进行解析,并相应地更新 GUI/进度。
Yes, in the main thread check for updates (or get notified by the worker threads) and then send the report progress over TCP Sockets (or using interprocess communications if on the same machine).
On the client side parse the information when you receive it, and update the GUI/Progress accordingly.