|
Thanks Albert
> If you kill a thread, make sure it's still a valid thread (i.e. still
> running). undefined behavior will result from killing an invalid thread.
How do I
check this? There are no other tasks that can kill threads apart from this
one. I also checked
process IDs after creation and before killing.
Best regards, mike
|
|
Message has 1 Reply: | | Re: threads
|
| two of your threads terminate shortly after being started (...) as far as I know, legOS provides no functionality for determining whether or not a thread is alive or not. You need to keep track of this yourself (e.g. using a variable/flag that gets (...) (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Re: threads
|
| some suggestions: 1) random_delay = random()/1000000; LegOS uses 16 bit integers, meaning the largest value an integer can have is something like 65535. The above statement is meaningless 2) (...) If you kill a thread, make sure it's still a valid (...) (23 years ago, 15-Jan-02, to lugnet.robotics.rcx.legos)
|
18 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
|
|
|
|