// 
// Decompiled by Procyon v0.6.0
// 

package io.netty.handler.codec.quic;

abstract class BoringSSLTask implements Runnable
{
    private final long ssl;
    protected boolean didRun;
    private int returnValue;
    private volatile boolean complete;
    
    protected BoringSSLTask(final long ssl) {
        this.ssl = ssl;
    }
    
    @Override
    public final void run() {
        if (!this.didRun) {
            this.didRun = true;
            this.runTask(this.ssl, (ssl, result) -> {
                this.returnValue = result;
                this.complete = true;
            });
        }
    }
    
    protected void destroy() {
    }
    
    protected abstract void runTask(final long p0, final TaskCallback p1);
    
    interface TaskCallback
    {
        void onResult(final long p0, final int p1);
    }
}
