Re: Task API question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Michael Nelson wrote:
> I have also noted that when the end of the top level code is reached the 
> program terminated even if there are other task active besides task 0. 
> Is this the desired behavior? Task 0 can be killed or suspended without 
> terminating the program, should the code for opRETURNT be modified to 
> check for other active tasks?
> 
> I could argue the case either way and I can program around if quite 
> easily with my new lib.

It's a good point.
If the top-level code reaches the end, I think it will be
more convenient for most people if the whole program 
simply ends at that point. It will be the same effect as  
executing an abort(). In the code I've worked with, you might
have some dangling tasks, some of which are actually infinite
tasks that wait for work to be given to them. It might
be a bit of a bother for the top-level task to have to
go through all these tasks and kill them. People might frequently
forget to do this, and then be surprised that their program
is "hanging" indefinitely (due to a task that has not died).
If the top-level task does need to let some other tasks finish,
it could check their status, or perhaps some global variables, 
and not terminate until they are all done.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu