473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Multi Threading

I am using multi threading per customer ( currently 2 only ) to send
http request for data pooling / pushing.
It looks like if one thread is in process of pooling data, the other
thread is waiting until that process is finished.
I am using Utils dll with HTTPSend class to be called for http Send.
What am I doing wrong?

Feb 21 '06 #1
6 1153

<ed******@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I am using multi threading per customer ( currently 2 only ) to send
http request for data pooling / pushing.
It looks like if one thread is in process of pooling data, the other
thread is waiting until that process is finished.
I am using Utils dll with HTTPSend class to be called for http Send.
What am I doing wrong?


Thats a pretty wide question. Could you provide more detail? Specifically,
what makes you think that the other thread is waiting?
Feb 22 '06 #2
It takes about 20-25 minutes to pool file from 1st customer ( 1 big
file).
Meanwhile, second thread suppose to be sending responses for the 2nd
customer, smaller files, takes about 2-5 seconds to process, but it's
not processing them, until 1st customer's file is finished pooling.
As soon as 1st file is pooled, the other thread is quickly finished.

I am using simple threading:

Dim cls As New clsTimerThread
'Create the new thread
Dim t As New Thread(AddressOf cls.subRunningTask)
t.Start() 'Begin execution of the new thread

where clsTimerThread is calling my HTTP class.

should I use ThreadPooling instead?
Or something else?

I need both processes to be able to work in parallel.
Right now I have a filling of scalability issue.

Thanks in advance for any ideas.

Feb 22 '06 #3
1. A thread pool is generally used for loading similar items, here you
have two different processes, so i wouldn't use the ThreadPool class.

2. Are there any resources shared between the two processes on the two
threads? That is, could there be an object or server which is
"blocking" and forcing one thread to wait until the other has completed?


ed******@yahoo.com wrote:
It takes about 20-25 minutes to pool file from 1st customer ( 1 big
file).
Meanwhile, second thread suppose to be sending responses for the 2nd
customer, smaller files, takes about 2-5 seconds to process, but it's
not processing them, until 1st customer's file is finished pooling.
As soon as 1st file is pooled, the other thread is quickly finished.

I am using simple threading:

Dim cls As New clsTimerThread
'Create the new thread
Dim t As New Thread(AddressOf cls.subRunningTask)
t.Start() 'Begin execution of the new thread

where clsTimerThread is calling my HTTP class.

should I use ThreadPooling instead?
Or something else?

I need both processes to be able to work in parallel.
Right now I have a filling of scalability issue.

Thanks in advance for any ideas.

Feb 22 '06 #4
Both threads use the same object that is doing HTTP send.
Object is .net dll and I thought that it should be multi threaded.
May be I am mistaken?

Feb 22 '06 #5

It could be a singleton.

That is, even if you "multithread" if they are both using the same
object that sends messages serially they won't run in parallel.

You need to investigate that object and to see if you can open two
threads within it, or instantiate it twice (once for each thread).

ed******@yahoo.com wrote:
Both threads use the same object that is doing HTTP send.
Object is .net dll and I thought that it should be multi threaded.
May be I am mistaken?

Feb 22 '06 #6
I am instantiating at a thread level, therefore it is instantiated
twice.
To open new again on an object level sounds like overkill to me,- I
thought instantiating object is like a new thread, or am I wrong?
To create new thread every time I call an object sound like not a good
idea, or does it?

Feb 23 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
77
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for...
0
by: Stuart Norris | last post by:
Dear Group, I am attempting to write a "splash" and "status" Form using a second thread. I wish to use this Form to display status information to the user when I do CPU intensive work in my...
13
by: notregister | last post by:
my program have as many as 8 threads running at a same time. can different threads open a same file at the same time? let say thread1 open a file abc.txt at the same time with thread 2, both doing...
2
by: NiponW | last post by:
Hi, I have SQL SERVER 2000 SP4 Enterprise , Windows 2003 Enterprise on Xeon 4 Processors (now with multi-threading CPU) and I have questions which seem weirds to me (used to have the same...
20
by: dotyet | last post by:
Hi Everyone, It would be a real big help if anyone can shed light on whether DB2 UDB 8.2 on Solaris will make optimum use of a Sun T2000 server. The server has 1 CPU with 8 cores and each core...
0
ammoos
by: ammoos | last post by:
hi friends pls help me.. i got an assignment which i feel very difficult to me.. i dont have more knowledge about multi-threading in .net... the assignment details is below.... pls help me... i...
14
by: Akihiro KAYAMA | last post by:
Hi all. I found cooperative multi-threading(only one thread runs at once, explicit thread switching) is useful for writing some simulators. With it, I'm able to be free from annoying mutual...
5
by: George Maicovschi | last post by:
As multi-threading is not built in PHP I've been using a hack letting the Apache server handle the multi-threading issues, but I'm really curious of other approaches to this issue. If anyone has...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
Sorry this is so long winded, but here goes. Following the model of http://msdn2.microsoft.com/en-us/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx I made a remote object using the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.