Using a ScheduledExecutorService to run a task on a periodic basis in Java
问题 I am working on a program that will read data from a data source, and publish that data as it is read. I have a reader and a writer, the reader spawns several threads to read all the data it needs to read, puts the data into a queue, and the writer reads the data from the queue an publishes it. I have a controller for my readers and a controller for my writers. The controllers implement the Callable interface, but could implement the Runnable interface as my call return is Void . I want to