To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3427
3426  |  3428
Subject: 
Re: Threads within threads
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 29 Aug 2003 10:25:19 GMT
Viewed: 
3237 times
  
Ralph Clark wrote:

int main(etc)
{
    while(1)
    {
        execi(&monkey,etc);
        execi(&cow,etc);
    }
    return 0;
}

int monkey(etc)
{
    execi(thread1,etc);
    execi(thread2,etc);
}

Have you tried to run this code? I wonder what will happen "in real life".

Actually, main will start monkey and cow as fast as possible. I think
this will crash your stack after a short while.

Regards,

Michael



Message is in Reply To:
  Threads within threads
 
Is it possible to use threads within threads? In the example below (with all 6 threads having different priority levels), how does the priority setting of each thread affect it being executed earlier than other threads? I mean, I assume that thread1 (...) (21 years ago, 27-Aug-03, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR