Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: Multithreading

    by Norm
    Replies
    10
    Views
    1,819

    Re: Multithreading

    Try adding some calls to yield() or sleep() inside the threads.
    The tight loops in the code don't give the OS time to get control and pass control to another thread.
  2. Thread: Multithreading

    by Norm
    Replies
    10
    Views
    1,819

    Re: Multithreading

    ThreadA is started first and finishes immediately. ThreadC has not been started yet.

    You need the threads to do something that takes longer so that their priority can have an effect.
  3. Thread: Multithreading

    by Norm
    Replies
    10
    Views
    1,819

    Re: Multithreading

    What do you expect the output should be and why?
    The code is trivial and will probably execute immediately when started.

    Please edit your post and wrap your code with


    <YOUR CODE HERE>

    to...
  4. Thread: Multithreading

    by Norm
    Replies
    10
    Views
    1,819

    Re: Multithreading

    Can you post a small, complete program that compiles, executes and shows what you are asking about.
  5. Thread: Multithreading

    by Norm
    Replies
    10
    Views
    1,819

    Re: Multithreading

    Can you post a small program that compiles, executes and shows what you are asking about.
Results 1 to 5 of 5