I’m trying to setup a concurrency structure where some boiler plate code should be executed (to check pre-conditions) before a certain type of task. In other words, I would like to run code after an Executor has dequeued a task, but before it invokes execute on it. How can this be done?
I’m trying to setup a concurrency structure where some boiler plate code should be
Share
Use a decorator?
You can make it more specific if you want (eg by replacing Executor by ExecutorService) depending on your needs.