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

Luke Sandberg lukeisandberg at gmail.com
Mon Sep 15 19:11:58 EDT 2014


To close the loop here: Guava released MoreExecutors.directExecutor() as
part of Guava 18 <https://code.google.com/p/guava-libraries/wiki/Release18>

On Tue, Jun 24, 2014 at 9:52 AM, Martin Buchholz <martinrb at google.com>
wrote:

>
>
>
> 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/20140915/89092ee0/attachment.html>


More information about the Concurrency-interest mailing list