GRPC C++  1.26.0
iomgr.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_H
20 #define GRPC_CORE_LIB_IOMGR_IOMGR_H
21 
23 
26 
27 #include <stdlib.h>
28 
30 void grpc_iomgr_init();
31 
33 void grpc_iomgr_start();
34 
37 void grpc_iomgr_shutdown();
38 
42 
43 /* Returns true if polling engine runs in the background, false otherwise.
44  * Currently only 'epollbg' runs in the background.
45  */
47 
50 
55  grpc_error* error);
56 
57 /* Exposed only for testing */
59 
60 #endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */
size_t grpc_iomgr_count_objects_for_testing()
void grpc_iomgr_shutdown()
Signals the intention to shutdown the iomgr.
Definition: error_internal.h:39
bool grpc_iomgr_add_closure_to_background_poller(grpc_closure *closure, grpc_error *error)
Returns true if the closure is registered into the background poller.
bool grpc_iomgr_run_in_background()
bool grpc_iomgr_is_any_background_poller_thread()
Returns true if the caller is a worker thread for any background poller.
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
void grpc_iomgr_start()
Starts any background threads for iomgr.
void grpc_iomgr_shutdown_background_closure()
Signals the intention to shutdown all the closures registered in the background poller.
void grpc_iomgr_init()
Initializes the iomgr.