Hi, 

I have following code:  

1. Context context = Context.current().withValue(Constant.FOO_CONTEXT_KEY, 
"Test 
Value");
2. String valueStr = Constant.FOO_CONTEXT_KEY.get();
3. System.out.println(valueStr);  //Returns null
4. context.run(() -> {
5.         System.out.println("Context Data is:" + Constant.FOO_CONTEXT_KEY
.get()); //Gives "Test Value"
6.}

I am not able to understand why is null returned at line no 3, where as 
proper value is returned at line no 5.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/06d7ee0f-8d1b-4014-8795-cf260e954795n%40googlegroups.com.

Reply via email to