Subject:
|
Re: Drive types
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sat, 13 Jan 2007 03:08:53 GMT
|
Viewed:
|
3194 times
|
| |
| |
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
|
|
Message has 1 Reply: | | Re: Drive types
|
| (...) 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 (...) (18 years ago, 14-Jan-07, to lugnet.robotics)
|
Message is in Reply To:
| | Re: Drive types
|
| (...) 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 (...) (18 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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|