Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
src
cpp
client
src/cpp/client/client_callback.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2019 gRPC authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#include <utility>
19
20
#include <
grpc/impl/codegen/grpc_types.h
>
21
#include <
grpcpp/support/client_callback.h
>
22
#include <
grpcpp/support/status.h
>
23
24
#include "
src/core/lib/iomgr/closure.h
"
25
#include "
src/core/lib/iomgr/error.h
"
26
#include "
src/core/lib/iomgr/exec_ctx.h
"
27
#include "
src/core/lib/iomgr/executor.h
"
28
#include "
src/core/lib/surface/call.h
"
29
30
namespace
grpc
{
31
namespace
internal
{
32
33
void
ClientReactor::InternalScheduleOnDone
(
grpc::Status
s) {
34
// Unlike other uses of closure, do not Ref or Unref here since the reactor
35
// object's lifetime is controlled by user code.
36
grpc_core::ExecCtx
exec_ctx
;
37
struct
ClosureWithArg {
38
grpc_closure
closure
;
39
ClientReactor
*
const
reactor;
40
const
grpc::Status
status
;
41
ClosureWithArg(
ClientReactor
* reactor_arg,
grpc::Status
s)
42
: reactor(reactor_arg),
status
(
std::move
(s)) {
43
GRPC_CLOSURE_INIT
(
44
&
closure
,
45
[](
void
* void_arg,
grpc_error_handle
) {
46
ClosureWithArg*
arg
=
static_cast<
ClosureWithArg*
>
(void_arg);
47
arg
->reactor->OnDone(
arg
->status);
48
delete
arg
;
49
},
50
this
, grpc_schedule_on_exec_ctx);
51
}
52
};
53
ClosureWithArg*
arg
=
new
ClosureWithArg(
this
,
std::move
(s));
54
grpc_core::Executor::Run
(&
arg
->closure,
GRPC_ERROR_NONE
);
55
}
56
57
bool
ClientReactor::InternalTrailersOnly
(
const
grpc_call
*
call
)
const
{
58
return
grpc_call_is_trailers_only
(
call
);
59
}
60
61
}
// namespace internal
62
}
// namespace grpc
grpc::internal::ClientReactor
Definition:
impl/codegen/client_callback.h:115
GRPC_CLOSURE_INIT
#define GRPC_CLOSURE_INIT(closure, cb, cb_arg, scheduler)
Definition:
closure.h:115
grpc::status
auto status
Definition:
cpp/client/credentials_test.cc:200
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition:
error.h:234
grpc
Definition:
grpcpp/alarm.h:33
closure.h
grpc_call_is_trailers_only
bool grpc_call_is_trailers_only(const grpc_call *call)
Definition:
call.cc:1872
grpc_core::Executor::Run
static void Run(grpc_closure *closure, grpc_error_handle error, ExecutorType executor_type=ExecutorType::DEFAULT, ExecutorJobType job_type=ExecutorJobType::SHORT)
Definition:
executor.cc:398
call
FilterStackCall * call
Definition:
call.cc:750
grpc_types.h
client_callback.h
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition:
abseil-cpp/absl/utility/utility.h:221
closure
grpc_closure closure
Definition:
src/core/lib/surface/server.cc:466
grpc_call
struct grpc_call grpc_call
Definition:
grpc_types.h:70
arg
Definition:
cmdline.cc:40
error.h
grpc_core::ExecCtx
Definition:
exec_ctx.h:97
executor.h
exec_ctx
grpc_core::ExecCtx exec_ctx
Definition:
end2end_binder_transport_test.cc:75
grpc::internal::ClientReactor::InternalTrailersOnly
virtual bool InternalTrailersOnly(const grpc_call *call) const
Definition:
src/cpp/client/client_callback.cc:57
grpc::Status
Definition:
include/grpcpp/impl/codegen/status.h:35
arg
struct arg arg
exec_ctx.h
closure
Definition:
proxy.cc:59
grpc::internal::ClientReactor::InternalScheduleOnDone
virtual void InternalScheduleOnDone(grpc::Status s)
Definition:
src/cpp/client/client_callback.cc:33
internal
Definition:
benchmark/test/output_test_helper.cc:20
grpc_error
Definition:
error_internal.h:42
grpc_closure
Definition:
closure.h:56
call.h
status.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:46