Originally posted by Mr. C Lamont Gilbert:
why does it matter which thread runs the code? That should be abstract.
Command pattern or strategy is good way to allow a thread to run different code at different times.
Originally posted by Ken Blair:
I'm working with COBOL files and in order to open a new connection to a file it must be done in a new Thread. The fun part comes when I have to keep that Thread alive and wait for further requests to be made on that file.
From the API:
This interface provides a way of decoupling task submission from the mechanics of how each task will be run, including details of thread use, scheduling, etc