hi friends, i am trying to think of real world situation where this Threading is a MUST. could someone please come up and educate me a real world situation that's only solved by Threading? thank. namaste
Dave Landers
Ranch Hand
Joined: Jul 24, 2002
Posts: 401
posted
0
Web Server has to process requests from lots of clients simultaneously. Graphical User Interface re-drawing a large <something> without locking up the menus, mouse, buttond. I am playing an MP3 and yet still I can type. Speeding up sections of a program where you have a CPU-bound process and an I/O-bound process. If you do them at the same time, the overall speed is increased. Periodically check for new mail while you are also reading mail and composing a reply and downloading a virus. Drawing the fly buzzing around the Moose's noze while I am typing this at the same time. Etc.
Steven Daniels
Greenhorn
Joined: Aug 09, 2002
Posts: 4
posted
0
I can't think of any example of a program that must use threads. Any program that you make with multiple threads could instead be made with one thread. However, there are many situations where it is more appropriate to use multiple threads.(Some good examples are given in Dave's post above.) It is like the decision to use loops or recursion. Any algorithm can be implemented using either, but there are some situations where one works out better than the other.
Leslie Chaim
Ranch Hand
Joined: May 22, 2002
Posts: 336
posted
0
:roll: :roll: Real World situations :roll: :roll: My very first post to the javaranch was to this forum and I think its a good example. BTW, I am still waiting for an answer :( Maybe the gurus are hiding here
Normal is in the eye of the beholder
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.