PAUSING ND RESUMING FUNCTION IN JAVA

Closed
monna oa likhang Posts 12 Registration date Thursday October 14, 2010 Status Member Last seen January 8, 2016 - Dec 10, 2011 at 02:39 AM
monna oa likhang Posts 12 Registration date Thursday October 14, 2010 Status Member Last seen January 8, 2016 - Dec 29, 2011 at 02:49 PM
Hello,

Can any1 hlp me,i hve 2 functions,A&B,nd B is calld in A,nd also A is clld in B.so i want 2 b able 2 pause A,(say it stores artists in an array nd it's at artist[3]),den jump 2 B.im nw in B,whn it is at,say,dancer[5],i want 2 pause it,nd resume A sch dat A starts where it stopd,ie,artist[3]!lol,wat g lng story!i thnk im clear!thnx in advance 4 ur hlp
Related:

1 response

Blocked Profile
Dec 26, 2011 at 07:31 AM
your specification is more similar to a deadlock scenario.so use a variable which you can use as a lock.so when you jump from 'a' to 'b' lock that variable,save 'a' status in a file or variable.again when you come back to 'a' from 'b',use other variable for 'b' to lock and free 'a' locked variable,get a status from that file and save 'b' status to file and resume.
0
monna oa likhang Posts 12 Registration date Thursday October 14, 2010 Status Member Last seen January 8, 2016 2
Dec 29, 2011 at 02:49 PM
Oh thnx alot,this rily sounds 2make sense.bt dn im stil a nw programa so ther r some thngs i cnt undastnd!so cn u plz show m a code 4 ds,js a simple code relatin 2 ds 4rm whch i cn learn some imprtant trickz!oh tnx a lot,ds sounds so gud!
0