Can i call a Method on the Thread Object ??
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It appears you have changed the question.
The simplest way to do this is to use an ExecutorService and submit ia task to call a specific method.
For your original question.
I don’t know of any reason you can’t.
You may want to wait a short period as it could fail repeately and you don’t want to spam the server or overload your machine. I would add a
A retry period of a few seconds e.g. 2000 may be fine.