Search:

Type: Posts; User: Saeid

Search: Search took 0.08 seconds.

  1. Replies
    12
    Views
    5,659

    Re: How Can I run java threads

    the InChannel and OutChannel points to one list.
    thread2.InChannel=Thread1.OutChannel.
    then if I use the InChannel.wait(), in fact it waits for the outChannel and when I use the OutChannle.Notify()...
  2. Replies
    12
    Views
    5,659

    Re: How Can I run java threads

    I have 2 threads. these threads shares a linked list between them. but one of them writes into list and the other one reads from that. now, what should be happen if the list is empty?
    the reader...
  3. Replies
    12
    Views
    5,659

    Re: How Can I run java threads

    calling the start() method for one thread more than once is not allowed.
    but I want to run my thread(s) for ever. and I have a problem that I think once a thread goes to wait() state it never comes...
  4. Replies
    12
    Views
    5,659

    Re: How Can I run java threads

    Thanks for reply
    I examined sleep(...) but it was not worked like I want.you know, now I have got another message:
    Illegal ThreadStateException. Of course I know the code below is not right. but I...
  5. Replies
    12
    Views
    5,659

    Re: How Can I run java threads

    thanks but let me say my problem by an example:

    suppose a C program like this:


    //something here
    scanf(...)
    scanf(...)
    //something else
  6. Replies
    12
    Views
    5,659

    How Can I run java threads

    Hi All
    I have a thread. first I start it, then it executes the run() method automatically. this thread reads data from a linked list. if the list is empty then I use wait() to block the thread. when...
Results 1 to 6 of 6