Subject:
|
Re: Drive types
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sat, 13 Jan 2007 02:50:12 GMT
|
Viewed:
|
3101 times
|
| |
| |
> 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?
-Tim
|
|
Message has 1 Reply: | | 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 (...) (18 years ago, 13-Jan-07, to lugnet.robotics)
|
Message is in Reply To:
| | Re: Drive types
|
| (...) Here is a simple multi-threaded NQC program: task music() { while (true) { PlayTone(262,40); Wait(50); PlayTone(294,40); Wait(50); PlayTone(330,40); Wait(50); PlayTone(294,40); Wait(50); } } task main() { start music; while(true) { (...) (18 years ago, 9-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
|
|
|
|