简体   繁体   English

在服务器端运行线程并在客户端显示进度可能吗?

[英]run threads on server side & show progress on client side possible?

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 预先感谢

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). 是的,在主线程中检查更新(或由工作线程通知),然后通过TCP套接字发送报告进度(如果在同一台计算机上,则使用进程间通信)。

On the client side parse the information when you receive it, and update the GUI/Progress accordingly. 在客户端,当您收到信息时解析这些信息,并相应地更新GUI / Progress。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM