Thanks! Does deadline actually mean the lifespan of a stub? If so I got it all wrong. I thought it's just the waiting time for each call invoked from that stub.
Is it recommended practice to create a new stub for each grpc call? Are there any docs stating that? On Monday, March 19, 2018 at 4:58:17 PM UTC+1, [email protected] wrote: > > I think it's because calling `withDeadlineAfter` applies the timestamp of > the deadline to a new stub and returns that new stub to you. If the > deadline value is small, the deadline may expire before you have a chance > to finish your second RPC. This is true for all stubs. Creating new stubs > are cheap, so you can create a new stub with a deadline when you are making > each RPC. > > On Monday, March 19, 2018 at 2:50:43 AM UTC-7, Baojun Xu wrote: >> >> Hi, >> >> I am trying to use withDeadlineAfter() on a futureStub, but noticed that >> an error DEADLINE_EXCEEDED" is always thrown when a rpc is made on the >> futureStub for a second time. >> >> Just wondering why this is the case? Maybe there is some restrictions to >> use deadlines with FutureStubs? >> >> Any help is appreciated! >> >> Best, >> Baojun >> > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6e352dc8-fe01-4313-8b7e-3a1fd2b33224%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
