Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Multiple Threads with different tasks

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multiple Threads with different tasks

    Hi everyone,
    I want to create a program in java with multiple threads where each one do a particular task. Tasks are independant from each other, so threads are concurrent, they can be run in parallel without waitng for any data from another thread. Can any one give me an example on this?
    Thank you in advance


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Multiple Threads with different tasks

    Moved to Threads section.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Multiple Threads with different tasks

    isn't this thread section? i am new to this forum. Can you orinet me?

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Multiple Threads with different tasks

    Perhaps you're confused because you have two threads on the same topic. Here's the dupe.

    Please don't post duplicate threads. It just confuses everybody.

  5. #5
    Junior Member lyhung009's Avatar
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Multiple Threads with different tasks

    This is quite easy example, you can find it somewhere on Google.
    Always read, always write, can not stop learning! I'm willing to answer your question.

  6. #6

    Default Re: Multiple Threads with different tasks

    Multithreading extends the idea of multitasking into applications, so you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different applications, but also among each thread within an application.

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Multiple Threads with different tasks

    Please don't post on such old threads.
    Closed
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: October 25th, 2013, 10:43 PM
  2. [SOLVED] How to get Progress updates from multiple threads...
    By Becca in forum Threads
    Replies: 4
    Last Post: February 7th, 2012, 01:34 PM
  3. Replies: 6
    Last Post: December 9th, 2011, 05:53 PM
  4. working with multiple threads
    By retsameht in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 9th, 2010, 01:36 PM