[grpc-io] Re: How to resolve potential grpc::ClientBidiReactor data racing

2024-03-26 Thread 'AJ Heller' via grpc.io
Hi Zhanhui,

Just in case, please read through the callback API spec to refamiliarize 
yourself: 
https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md

Note that you can only have one outstanding read or write at a time. If you 
are calling StartWrite while a previous write's OnWriteDone method has not 
yet been called, that's improper use of the API (and effectively undefined 
behavior).

I hope this helps!

Best,
-aj
On Monday, March 18, 2024 at 7:52:40 PM UTC-7 Zhanhui Li wrote:

> Hi gRPC C/C++ community,
>
> I am building C/C++ client for an opensource project using gRPC and we 
> have a bidirectional stream API.
>
> For the client side implementation, we need to create a class, inherting 
> from ClientBidiRecator, overriding some methods.
>
> Note the OnXXDone methods has parameter "bool ok",  requiring "If false, 
> no new read/write operation will succeed, and any further Start* should 
> not be called."
>
> The problem is,  Start{Read, Write} call could be concurrent with the 
> OnXxxDone one.
> What would the consequences be if Start* called after On*Done with ok 
> being false? Is there a way to walkaround this?
>
> Best Regards!
>
> Zhanhui Li 
>

-- 
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/e0c7cbdb-b602-44b9-be6f-ade86a8c11adn%40googlegroups.com.


[grpc-io] Re: Plugin failed with status code

2024-03-26 Thread 'AJ Heller' via grpc.io
Did you follow the quickstart guide to build and install gRPC and protocol 
buffers using cmake? https://grpc.io/docs/languages/cpp/quickstart/

Best,
-aj
On Monday, March 25, 2024 at 11:09:41 PM UTC-7 Suraj Kottayi wrote:

> How do i generate code using cmake, during configuration.??
> The issue with cmake command execute_process() is that the argument 
> "--plugin=protoc-gen-grpc=/usr/local/grpc_cpp_plugin"
> has to be absolute, trying to change it into a variable is throwing =>
>
> : program not found or is not executable
> Please specify a program using absolute path or make sure the program is 
> available in your PATH system variable
> --grpc_out: protoc-gen-grpc: Plugin failed with status code 1
>

-- 
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/c19fd22c-5a8f-4742-9907-2ed59b704dc7n%40googlegroups.com.