@William :
Dear William consider a scenario , you have a connection (object- encapsulated a authenticated session) to a server. by using connection object you have to send some commands to server and taking response from server, to make this connection alive ,persists you have to call a method periodical in a infinite loop, in mean time if you want to execute a command by using connection ,you have to stop infinite loop method, and start executing other method using same connection object connection. and when commands are completed you have to recall infinite loop method to make connection alive continuously.
Here my problem is how switch between methods (infinite loop method and other command methods how to stop a infinite loop method by run time argument) i cant use recursion methods,can't call a method inside a method).
Hope you got my point .
Regards
Gaurav