Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Please, I need your help urgently. my email is [deleted]@[no need to know].com
I think my problem should be an issue with thread. I have about five threads running at the same time and all five doing similar processing (i:e Listening on a port, receiving data etc.).

but when 1 of the thread receives data and start processing it, 1 of the thread stops running while the rest are still active and running.


The codes are much that's why I didnt post it. Actually I have 5 different modules in different threads. each of the module is listening on a port for in coming connection request and also checking the arrival of data on those ports. 1 thread handles TEXT messages, process and distributes it to clients. Then another thread handles in coming documents, then pass it to a subroutine that writes the file on the server pending a clients request for the doc. but as soon as that routine (document routine) is called, the thread for text messages stops running or processing. that means, that no client can communicate any more.

the code is a little bulky, that was why i removed it.
Posted
Updated 25-May-13 2:52am
v5
Comments
[no name] 24-May-13 9:53am    
Please do not post your email address in public forums. It is an invitation to spammers. Unless you like spam.
It is not urgent at all.
How could we possibly know what the 1 thread is doing/not doing when you do not post the relevant code?
Sergey Alexandrovich Kryukov 24-May-13 10:25am    
There are too many ways to screw up things, especially in threading. You used one of those ways. Fix it.
—SA
Harry Ike 25-May-13 8:32am    
sorry, in your opinion im screwing up my project right?
Nelek 25-May-13 11:35am    
That was an ironic way to tell you... how are we supposed to know what happens, with the bad information / description you are doing? We can not read you mind or see you monitor, so it is impossible for us to help you, without more information and code involved.
Sergey Alexandrovich Kryukov 25-May-13 19:33pm    
There is nothing more negative in my saying, compared with your own information. This word is used when something goes wrong. You cannot deny that certain things go wrong in your project, can you? :-) I only use you own information, and the only point is that we cannot know what exactly is wrong. Due to suddenly cold days, my access to your hard drive is somewhat limited...
—SA

Quote:
The codes are much that's why I didnt post it.

Quote:
the code is a little bulky, that was why i removed it.

It looks yourself are lost in your code. I would (if possible) switch off all the possible noise (for instance you might use conditional compilatio and inspect one element (that is one thread) at time n). This way you may possibly locate the problem.
 
Share this answer
 
I want to thank you guys for your attention. I solved the problem by separating my file server from sms server and it's working for now.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900