<div dir="ltr">To elaborate more, your executor can be created for any type, but that is almost pointless for an executor, because an executor instance has to support all types. Similarly you can't create a simplified `ExecutorService` as `Function<Callable<T>, Future<T>>`. Such an executor would be very limited in usefulness, because to simply put: An executor cannot have a type argument.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Attila Kelemen <<a href="mailto:attila.kelemen85@gmail.com">attila.kelemen85@gmail.com</a>> ezt írta (időpont: 2023. aug. 11., P, 20:16):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It isn’t. I think you need to think about this some more.<br>
<br><br></blockquote><div><br></div><div>Ok, then how do you implement what I wrote with functions and similar? It is impossible, because the executor can't know "T", it is a private detail to its user of the executor, and not only that but it can be different everywhere. For you it works, because your "executor" after instantiated only supports strings.</div></div></div>
</blockquote></div>