×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    i want to check thread alive or not

    I want to make a thread and check it's alive or not from anywhere in the midlet

    i know thread.isAlive() is called for that but it works only if i write it in where i created the thread

    i wanna for example run the thread in startApp()

    and inside the MIDlet i make a Command that want to check if the thread is running or not

    what i have to do
    Let The Impossible Happen!!!

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: i want to check thread alive or not

    You either use a global variable (for example define it outside any method, but inside your MIDlet class) to store the reference to the thread or you pass a reference to the thread between the different methods as a parameter.

    Hartti

  3. #3
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    Re: i want to check thread alive or not

    i want for example a thread to display alert contain text like Goodbye and after its set Time out which i defined end it quit the MIDlet

    i tried do it alot but it doesn't work for me

    can u help me
    Let The Impossible Happen!!!

  4. #4
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: i want to check thread alive or not

    like i answered on your previous post on the subject, you don't need a thread for that, the alert class is probably not the correct object for doing what you are willing to do since there is no convenient way of knowing when it is dismissed.
    use a regular Form, display it, put an exit command on it, add a commandlistener that exits the application, and if you wish a timer that also exits the application.
    threading is not going to help you here.

Similar Threads

  1. check the thread panic code
    By xhsoldier in forum Symbian
    Replies: 1
    Last Post: 2009-12-18, 07:10
  2. Check-01 and Check -15:Symbian signed testing criteria
    By sumeet_netsmartz in forum Symbian
    Replies: 1
    Last Post: 2009-09-17, 09:04
  3. Thread is supposed to be dead, but it's still alive
    By guillermo_cantu in forum Symbian
    Replies: 3
    Last Post: 2006-10-23, 21:31
  4. RSessionBase alive check
    By i_dachev in forum Symbian
    Replies: 17
    Last Post: 2006-09-29, 12:37
  5. No Thread Alive
    By bprasety in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-30, 09:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×