• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Context that requires Thread

 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
: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
 
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic