netty/netty — pull request #2157 by normanmaurer (2014-01-27 13:23:29+00:00)
Title: DefaultPromise may notify Listeners in wrong order

This pull-req is not complete yet but show a race in DefaultPromise which can lead to have FutureListener notified in a wrong order.

One way to fix this is to enlarge the scope of the synchronization but I would like to think about some better way to fix it.

This can happen if addListener is called from a different thread then the EventExecutor that is used by the DefaultPromise itself and the DefaultPromise is notified while adding these listeners.