New event loop API

Showing 1-2 of 2 messages
New event loop API 이희승 (Trustin Lee) 4/3/12 6:18 AM
Hi folks,

I'm currently working on the new event loop API which is much cleaner
than what we had before.  For example, you create a new channel and
register it to an event loop to let it handle I/O.

    Channel ch = ...;
    EventLoop loop = ...;
    loop.attach(ch);

EventLoop implements ExecutorService for now, but I'm going to make it
implement ScheduledExecutorService so that a user can execute a task on
time.

Also, we do not pull threads from an executor anymore.  The default
abstract implementation (SingleThreadEventLoop) creates a new thread and
uses it until it is shut down.  No more releaseExternalResources() but
just shutdown().

I half-ported AbstractNioWorker but I don't think it's working right
now.  Also, I'm going to keep changing the EventLoop API to make it better.

So, here comes the first commit: http://j.mp/HcFKEZ

Cheers,
T

--
https://twitter.com/trustin
https://twitter.com/trustin_ko
https://twitter.com/netty_project

Re: New event loop API Norman Maurer 4/3/12 6:23 AM
Hi Trustin,

I just had a quick look and it looks very cool. I will have a in-depth
review later today or tomorrow.

I also like the Worker -> EventLoop naming change as it makes things
more "clear".

Bye,
Norman

Ps: I'm currently thinking about to implement half closed sockets in
master. I hope we don't have to merge to often ...

2012/4/3 "이희승 (Trustin Lee)" <tru...@gmail.com>: