GRPC core library. Multithreading.

50 views
Skip to first unread message

Денис Ваксман

unread,
May 2, 2020, 11:13:48 AM5/2/20
to grp...@googlegroups.com
Dear All,
I'm working on developing a library for communication via gRPC. High-level API doesn't fit the project requirements, so I chose the grpc-core library as the basement.
But I've noticed that the grpc-core library starts up several threads on grpc_init().
It's critical for my situation and prevents me from using grpc-core at all.
Is there some way to disable multi-threading in the grpc-core library?
I need only gRPC Client functionality and it's ok if server mode doesn't work.
Looking forward to your reply,
Denis V.

Nicolas Noble

unread,
May 4, 2020, 3:04:17 AM5/4/20
to Денис Ваксман, grp...@googlegroups.com
The grpc-core library isn't public API. There is no guarantee of stable API from it. Also, multi-threading is necessary for a variety of reasons, and it isn't possible to disable it.

You may want to check https://github.com/Juniper/grpc-c

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/706331588431915%40mail.yandex.ru.

Sivaram Kumar Battu

unread,
May 9, 2020, 1:04:00 AM5/9/20
to grpc.io
Hi Denis,

You can try the following at your own risk/adventure, I am not sure what you will be missing out and how much of an impact you might have for your use case.

Comment start_threads() in here

Change 'true' to 'false' in SetThreading()

As Nicholas mentioned this part isn't a public API and even if it works now, it is fragile for future updates.

Best, -R.
Reply all
Reply to author
Forward
0 new messages