public IPromise scheduleSendLoop ( ConnectionRegistry reg ) { Promise promise = new Promise ( ) ; sendJobs . add ( new ScheduleEntry ( reg , promise ) ) ; synchronized ( this ) { if ( ! loopStarted ) { loopStarted = true ; Actor . current ( ) . execute ( this ) ; } } return promise ; }
return a future which is completed upon connection close