can someone give me the code example that shows how to use two different threads on a single service? i didnt find the way to do it in google, then i need a code example…
one waiting 5 seconds and the other waiting 60 seconds, with different code
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.
Now you just need to define your runnables.
Also, you should give your runnables a way to detect that they’ve been interrupted and terminate if they do, and interrupt each thread in your service’s clean-up code.