[concurrency-interest] Proposal for a CallerRunsExecutor in j.u.c.Executors

Martin Buchholz martinrb at google.com
Tue Jun 24 12:52:35 EDT 2014

On Mon, Jun 23, 2014 at 7:19 PM, Zhong Yu <zhong.j.yu at gmail.com> wrote:

> On Mon, Jun 23, 2014 at 5:39 PM, Martin Buchholz <martinrb at google.com>
> wrote:
> > Since introducing a plain Executor is much better than doing nothing,
> let's
> > start with that.
> Is it necessary though? In java 8, programmers can simply use
Of course it's not necessary, and that was a reason to not include it back
in 2005.  But it's quite popular, and as Doug says, merely giving it a
standard name has a lot of value.

It would also have value to go further and define an ExecutorService, but
the smart people here need to agree on the semantics.

>     (Executor)Runnable::run
> Pre java8, an anonymous class isn't too verbose either
>     new Executor(){ public void execute(Runnable r) { r.run(); } }
> It doesn't seem to warrant a convenience method in java.*.
> Zhong Yu
> bayou.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20140624/87fa2df1/attachment.html>

More information about the Concurrency-interest mailing list