Hi Grpc team! 
I have a ServerInterceptor instance for my grpc server, it does something 
like this:

@Override
    public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(
            ServerCall<ReqT, RespT> call, Metadata headers, 
ServerCallHandler<ReqT, RespT> next) {
        Context context = Context.current();
        .... // more code here 
        context = context.withValue(USER_ID, "my-user-id");
        return Contexts.interceptCall(context, call, headers, next);
    }

and in my service method I get access to the userId using smth like this:

USER_ID.get()


I have some questions:
Is this implementation correct?
Is this thread safe?
Is there any way to test that implementation?
Is there any documentation that I can check to understand how Threads are 
handled by the grpc server?

Thanks in advance! :) 

Edu-

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/dd20dd3f-a743-4a1d-b9d6-a86d01028a32n%40googlegroups.com.

Reply via email to