• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implications of a singleton Thread

 
adithya narayan
Ranch Hand
Posts: 79
Android Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just thinking of making a single object of a thread i.e. a singleton so that i have made just a single Thread object in my entire application.
Its job will be same whenever i call. The purpose of doing it is simple. I don't want to make the process run in the main application thread.

I also would like to synchronize the job (work done by runnable) if the job is called from multiple locations.

I wanted to know how good this design will be and what can be the pros and cons of it ?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic