Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I have one big list with all threads, regardless of which process they belong to. That way I have fast access to a thread's data just by knowing it's ID. Every thread has a process ID which points to an entry of the process list. This system works pretty well for me.
interrupts should not kill a task. Exceptions however may be fatal if unhandled. Think for yourself whether you want to kill an entire process upon an unhandled exception or not.
Do you want sleep to suspend all the other threads as well, stopping them from doing useful work when your thread has nothing left to do at the moment?
Do you want to be able to terminate individual threads remotely, or will you always kill the entire process, maybe you want different behaviour for tasks outside the program and internal to the program.
Most of them are design choices really.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:interrupts should not kill a task. Exceptions however may be fatal if unhandled. Think for yourself whether you want to kill an entire process upon an unhandled exception or not.
Do you want sleep to suspend all the other threads as well, stopping them from doing useful work when your thread has nothing left to do at the moment?
Do you want to be able to terminate individual threads remotely, or will you always kill the entire process, maybe you want different behaviour for tasks outside the program and internal to the program.
Most of them are design choices really.
Yes you are right! I wanted only some advices...
However I think that I'll kill an entire process on an unhandled exception, and I will give a method to kill entire tasks or only threads.
Thank you.