线程同步问题

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

问题描述

我正在为分布式旅行锦标赛问题解决方案编写代码.
我有:
1.将线程分配给客户端的多线程服务器
2.要求客户端完成作业并将数据返回到服务器.
3.服务器线程应该等待从各个客户端收集数据,然后恢复执行,计算结果然后终止.

我的问题:
我使用了加入和同步功能,但没有帮助.我正在寻找类似工作线程的东西

希望您能解决我的问题,因为我是新手.

I am writing a code for distributed Traveling Tournament Problem Solution.
I have:
1.Multithreaded server which allocates chromosomes to the clients
2.Clients are required to completed the job and return the data to the server.
3. The server thread is supposed to wait for the data to be collected from various clients, and then resume it''s execution, calculate the result and then terminate.

My problem:
I used join and synchronize but no help. I am looking something like worker threads

I hope you get my problem as I am a newbie.

推荐答案


这篇关于线程同步问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 06:06
查看更多