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.
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.
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
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
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....