×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    233

    Sleep and Resume thread

    Hi all,

    I would like to sleep and resume a thread from other one. Is it possible? I would like to do it to simulate a pause in a Player...

    Thank you.

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Rawalpindi, Pakistan
    Posts
    486

    Re: Sleep and Resume thread

    try it out and see what happens. i am not sure what will happen. but honestly speaking i dont think it will work. do share ur result though its interesting point.
    Regards
    Nouman

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    13

    Re: Sleep and Resume thread

    Hi friend,
    See you definetly can pause a thread by using Thread.yeild() or Thread.sleep(long) methods however if u are trying to use it for pausing effect in your player i guess it cannot be done by pausing your threads becausce once a player is started the KVM internally starts it own thread for the player and u do not have control over that thread ..however u can use the api,s available to control ur pllayer..for more reading u could refer any MMapi documentation.Also u could refer the site below

    http://today.java.net/pub/a/today/2005/09/27/j2me4.html

    I have assumed u are taking about using JAVA MMAPI for this development

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    233

    Re: Sleep and Resume thread

    Yes but I have found a problem when I have two players in two different threads playing at the same time. When one of them finish, the other one too... I have implemented correctly the notifiers so it is not the problem... I would like to simulate a pause because if I pause the Player, whilst the other is playing, then when the second finish the first can't be resumed, because is closed magically....

Similar Threads

  1. Simple thread creation
    By erst in forum Symbian
    Replies: 11
    Last Post: 2007-05-02, 02:34
  2. CTimer : how to stop this?
    By silviuccia in forum Symbian
    Replies: 4
    Last Post: 2006-12-21, 16:47
  3. How to Thread?
    By silviuccia in forum Symbian
    Replies: 6
    Last Post: 2006-10-27, 11:13

Posting Permissions

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