peichhorn / lombok-pg

Collection of lombok extensions
http://peichhorn.github.com/lombok-pg/
Other
326 stars 44 forks source link

executors for @ListenerSupport #139

Closed fommil closed 5 years ago

fommil commented 11 years ago

by example...

    private final Executor executor = ...

    protected void fireReceivePacket(final Packet arg0) {
        for (final EmotivListener l : $registeredEmotivListener) {
            Runnable runnable = new Runnable(){
                @Override
                public void run() {
                    l.receivePacket(arg0);
                }
            };
            executor.execute(runnable);
        }
    }