thread remove -- kill a running thread or team
Success = THREAD REMOVE Option$, ID
For a given ID this command kills either the team or the thread. Thus Option$ is either "TeamID" or "ThreadID". If the team or thread was killed successfully Success is set to true, otherwise it is set to false.
Note: You can crash your system with this command! If you do not know what this command is meant for, then do not use it!
id = thread get "teamid", "/boot/home/config/bin/yab kamikaze.yab"
print "Commiting suicide..."
success = thread remove "teamid", id
print "This line is never reached."
Save this example in the file kamikaze.yab and start it from the command line (not from the IDE). It first gets the ID from itself and then kills its own team. Thus the last print command is not executed anymore. This is a very unelegant way to exit.