320 // Don't use a SequentialScheduler here: rely on onNext() being invoked |
320 // Don't use a SequentialScheduler here: rely on onNext() being invoked |
321 // sequentially, and not being invoked if there is no demand, request(1). |
321 // sequentially, and not being invoked if there is no demand, request(1). |
322 // onNext is usually called from within a user / executor thread. |
322 // onNext is usually called from within a user / executor thread. |
323 // Initial writing will be performed in that thread. If for some reason, |
323 // Initial writing will be performed in that thread. If for some reason, |
324 // not all the data can be written, a writeEvent will be registered, and |
324 // not all the data can be written, a writeEvent will be registered, and |
325 // writing will resume in the the selector manager thread when the |
325 // writing will resume in the selector manager thread when the |
326 // writeEvent is fired. |
326 // writeEvent is fired. |
327 // |
327 // |
328 // If this method is invoked in the selector manager thread (because of |
328 // If this method is invoked in the selector manager thread (because of |
329 // a writeEvent), then the executor will be used to invoke request(1), |
329 // a writeEvent), then the executor will be used to invoke request(1), |
330 // ensuring that onNext() won't be invoked from within the selector |
330 // ensuring that onNext() won't be invoked from within the selector |