Search:

Type: Posts; User: Saeid

Search: Search took 0.08 seconds.

  1. Replies
    4
    Views
    2,026

    Re: How to use and notify

    OK. thanks
  2. Replies
    4
    Views
    2,026

    Re: How to use and notify

    the method that writes into list, the list is called OutChannel



    synchronized(OutChannel)
    {
    DataItem.DataField =Data;
    DataItem.Valid=true;

    ...
  3. Replies
    4
    Views
    2,026

    How to use and notify

    Dear all
    I have four classes that extends thread. the names are for example C1, C2, C3, C4. now these threads shares a linked list between each other. C1 writes data to a list and C2 reads from that...
  4. Replies
    12
    Views
    5,661

    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()...
  5. Replies
    12
    Views
    5,661

    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...
  6. Replies
    12
    Views
    5,661

    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...
  7. Replies
    12
    Views
    5,661

    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...
  8. Replies
    12
    Views
    5,661

    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
  9. Replies
    12
    Views
    5,661

    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 9 of 9