79: implement AsyncHandle
Reviewed-by: jfdenise
This commit is contained in:
parent
cbfa7c977f
commit
26cdf26de6
@ -29,6 +29,7 @@ import java.nio.ByteBuffer;
|
||||
|
||||
import net.java.libuv.Address;
|
||||
import net.java.libuv.Stats;
|
||||
import net.java.libuv.cb.AsyncCallback;
|
||||
import net.java.libuv.cb.CallbackHandler;
|
||||
import net.java.libuv.cb.CheckCallback;
|
||||
import net.java.libuv.cb.FileCallback;
|
||||
@ -67,6 +68,16 @@ final class LoopCallbackHandler implements CallbackHandler {
|
||||
this.eventLoop = eventLoop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleAsyncCallback(final AsyncCallback cb, final int status) {
|
||||
try {
|
||||
cb.onSend(status);
|
||||
eventLoop.processQueuedEvents();
|
||||
} catch (Exception ex) {
|
||||
eventLoop.loop().getExceptionHandler().handle(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleCheckCallback(final CheckCallback cb, final int status) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user