To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26707
26706  |  26708
Subject: 
Re: Drive types
Newsgroups: 
lugnet.robotics
Date: 
Sun, 14 Jan 2007 00:37:05 GMT
Viewed: 
7432 times
  
In lugnet.robotics, Ross Crawford wrote:
> In lugnet.robotics, Tim Byrne wrote:
> > > Using Precedes and Follows you can define as complex (or simple) a net of
> > > thread inter-dependencies as you may need.
> > 
> > Besides Precedes and Follows, are there other ways to start additional threads?
> > Specifically, I'd like to start additional threads and then continue the
> > execution of the current thread.  I might be misinterpreting this, but it seems
> > that Precedes and Follows only starts a new thread after the preceding one has
> > finished.
> > 
> > Also, is there a way for one thread to stop another?  In NQC there was start and
> > stop which provided a lot of flexibility.  I'm not sure how to do this in NBC or
> > NXC.  Is this possible now or perhaps in
> > the works for the future?
> 
> The problem is that the standard firmware doesn't support starting and stopping
> of threads AFAIK. But you can start multiple threads by putting
> 
> precedes thread1, thread2
> 
> in your main thread, when it exits both threads will start getting time slices.
> You just need to use semaphores (or other techniques) to tell threads when to
> stop.

Rosco is correct.  The standard NXT firmware uses a completely different
execution model than the old RCX firmware uses.  The NXT firmware does not
provide any mechanism at all for starting and stopping threads.  The only
mechanism is to define thread interactions via precedes and follows.  The NXT-G
language defines thread interactions graphically by connecting blocks together
with sequence beams.  In NBC you need to define the interactions of threads
declaratively.

John Hansen



Message is in Reply To:
  Re: Drive types
 
(...) The problem is that the standard firmware doesn't support starting and stopping of threads AFAIK. But you can start multiple threads by putting precedes thread1, thread2 in your main thread, when it exits both threads will start getting time (...) (20 years ago, 13-Jan-07, to lugnet.robotics)

14 Messages in This Thread:





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

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