In Java, is there a way to use annotations to make a method, on call, instead of being executed immediately, be scheduled in a priority queue – over which I would have implementation control – of a thread pool?
It’s important to note that these annotated methods can call each other, which raises another issue regarding how to handle the wait to which the primary call is subjected.
Furthermore, it would be appropriate for functions to return their respective types and values to the call sites, which are then executed again. I hope for some suggestion, or languid demonstration of a path to take as to how to implement annotations that schedule method calls in a priority queue of a pool of threads.
Arthur Valadares is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.