It is not clear which thread you are talking about and your platform.

gRPC core does set thread names if applicable. For example the sync server 
will set its threads with name "grpcpp_sync_server" in thread_manager.cc. 
For linux, the name is set to the pthread if GPR_LINUX_PTHREAD_NAME macro 
is set. 
If you use the gpr_log functions the current thread id will be logged, 
which is a way for you to tell which thread the log is generated from.

If you really want to set some thread name of your own, I guess you can 
(for linux) maybe use pthread_setname_np in your method handler? You can 
use gRPC's thd_posix.cc as an example.


On Tuesday, December 17, 2019 at 4:47:56 AM UTC-8 [email protected] 
wrote:

> I'm using c++ and version 1.22.1.
>
>
> On Tuesday, December 17, 2019 at 8:53:54 AM UTC+1, Christopher Warrington 
> - MSFT wrote:
>>
>> On Monday, December 16, 2019 at 5:16:48 AM UTC-8, Daniel wrote:
>>
>> > Is it possible to somehow name the threads that are spawned by grpc?
>>
>> Which language are you using? Which implementation of gRPC are you using?
>>
>> --
>> Christopher Warrington
>> Microsoft Corp.
>>
>

-- 
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/0fb632ea-cdd5-443b-a3a2-86a7a5d527d3%40googlegroups.com.

Reply via email to