The moose likes Threads and Synchronization and the fly likes ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads" Watch "ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads" New topic
Author

ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads

Alan Sandhurst
Greenhorn

Joined: Apr 30, 2004
Posts: 21
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
 
 
subject: ScheduledExecutorService.newSingleThreadScheduledExecutor appears to launch two threads
 
Threads others viewed
Div positioning problem
Double invoking on Action in struts
jQuery UI Widget issue
Problem with ChangeListener of JToggleButton
Starting Point for Script that Inserts a Folder of .PDF files into an SQL Server Database
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture