From mboxrd@z Thu Jan 1 00:00:00 1970 From: jens.ohlund@secrc.abb.se To: ecos-discuss@sourceware.cygnus.com Subject: [ECOS] Threads that end Date: Wed, 28 Jun 2000 23:30:00 -0000 Message-id: X-SW-Source: 2000-06/msg00347.html Hi ! I wonder what happens when a thread leaves the method it was given to run when created. Does it just "run away" or does it "die" (suspend) or what ? I have ported simpleRTJ to the AEB-1 and it communicates through a serial port. So I got three threads, two taking care of sending and receiving data over the serial port. The last one is a "guardian", it takes the data from the serialport, divides it into data that are going to the javaapplication or to the guardian as servicedata. The user connects to the jvm from pc and downloads the java code to the card. After that he can start the execution of the jvm and that means that a thread is created which runs the jvm. After that I can stop the thread and restart the jvm (within a while = the thread still exist), pause it (thread.suspend). But i'd like to have a Reset as well, and with that I mean I'd like to make the thread leave the jvm code (works) and leave the method it was executing (so resources is returned). Does the thread leaves the method, frees up resources and turns to a suspend mode ? If it does, does that mean I have to delete it afterwards to make it disaper in the scheduler ? yours Jens Ohlund