Search in sources :

Example 1 with CoroutineContext

use of kotlin.coroutines.CoroutineContext in project pinpoint by naver.

the class ResumeWithInterceptor method getAsyncContext.

private AsyncContext getAsyncContext(Object object) {
    if (object instanceof Continuation) {
        CoroutineContext context = ((Continuation<?>) object).getContext();
        if (context instanceof AsyncContextAccessor) {
            AsyncContextAccessor accessor = (AsyncContextAccessor) context;
            AsyncContext asyncContext = accessor._$PINPOINT$_getAsyncContext();
            return asyncContext;
        }
    }
    return null;
}
Also used : Continuation(kotlin.coroutines.Continuation) CoroutineContext(kotlin.coroutines.CoroutineContext) AsyncContextAccessor(com.navercorp.pinpoint.bootstrap.async.AsyncContextAccessor) AsyncContext(com.navercorp.pinpoint.bootstrap.context.AsyncContext)

Aggregations

AsyncContextAccessor (com.navercorp.pinpoint.bootstrap.async.AsyncContextAccessor)1 AsyncContext (com.navercorp.pinpoint.bootstrap.context.AsyncContext)1 Continuation (kotlin.coroutines.Continuation)1 CoroutineContext (kotlin.coroutines.CoroutineContext)1