• Post Reply Bookmark Topic Watch Topic
  • New Topic

ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads

 
Alan Sandhurst
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code:




My ProcessorTask performs simple business logic.

However, each time I run the above, the task gets invoked twice, i.e. after the initial delay it runs twice, and after each subsequent interval, it runs twice.

Any ideas what I'm doing wrong? Apologies if it's something obvious. Running on Windows XP SP3.

Thanks

Alan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!