@ -117,7 +117,8 @@ static void grpc_apple_register_write_stream_queue(
/// the global run loop thread gGlobalRunLoopThread.
static void grpc_apple_register_read_stream_run_loop (
CFReadStreamRef read_stream , dispatch_queue_t /*dispatch_queue*/ ) {
GRPC_POLLING_TRACE ( " Register read stream: %p " , read_stream ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 )
< < " (polling) Register read stream: " < < read_stream ;
grpc_core : : MutexLock lock ( & gGlobalRunLoopContext - > mu ) ;
CFReadStreamScheduleWithRunLoop ( read_stream , gGlobalRunLoopContext - > run_loop ,
kCFRunLoopDefaultMode ) ;
@ -130,7 +131,8 @@ static void grpc_apple_register_read_stream_run_loop(
/// by the global run loop thread gGlobalRunLoopThread.
static void grpc_apple_register_write_stream_run_loop (
CFWriteStreamRef write_stream , dispatch_queue_t /*dispatch_queue*/ ) {
GRPC_POLLING_TRACE ( " Register write stream: %p " , write_stream ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 )
< < " (polling) Register write stream: " < < write_stream ;
grpc_core : : MutexLock lock ( & gGlobalRunLoopContext - > mu ) ;
CFWriteStreamScheduleWithRunLoop (
write_stream , gGlobalRunLoopContext - > run_loop , kCFRunLoopDefaultMode ) ;
@ -220,9 +222,9 @@ static void pollset_global_shutdown(void) {
static grpc_error_handle pollset_work ( grpc_pollset * pollset ,
grpc_pollset_worker * * worker ,
grpc_core : : Timestamp deadline ) {
GRPC_POLLING_TRACE ( " pollset work: %p, worker: %p, deadline: % " PRIu64 ,
pollset , worker ,
deadline . milliseconds_after_process_epoch ( ) ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 )
< < " (polling) pollset work: " < < pollset < < " , worker: " < < worker
< < " , deadline: " < < deadline . milliseconds_after_process_epoch ( ) ;
GrpcApplePollset * apple_pollset =
reinterpret_cast < GrpcApplePollset * > ( pollset ) ;
GrpcAppleWorker actual_worker ;
@ -276,7 +278,8 @@ static grpc_error_handle pollset_kick(grpc_pollset* pollset,
GrpcApplePollset * apple_pollset =
reinterpret_cast < GrpcApplePollset * > ( pollset ) ;
GRPC_POLLING_TRACE ( " pollset kick: %p, worker:%p " , pollset , specific_worker ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 ) < < " (polling) pollset kick: " < < pollset
< < " , worker: " < < specific_worker ;
if ( specific_worker = = nullptr ) {
if ( apple_pollset - > workers . empty ( ) ) {
@ -299,7 +302,7 @@ static grpc_error_handle pollset_kick(grpc_pollset* pollset,
}
static void pollset_init ( grpc_pollset * pollset , gpr_mu * * mu ) {
GRPC_POLLING_ TRACE ( " pollset init: %p " , pollset ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 ) < < " (polling) pollset init: " < < pollset ;
GrpcApplePollset * apple_pollset = new ( pollset ) GrpcApplePollset ( ) ;
* mu = grpc_core : : GetUnderlyingGprMu ( & apple_pollset - > mu ) ;
}
@ -307,7 +310,8 @@ static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
/// The caller must acquire the lock GrpcApplePollset.mu before calling this
/// function.
static void pollset_shutdown ( grpc_pollset * pollset , grpc_closure * closure ) {
GRPC_POLLING_TRACE ( " pollset shutdown: %p " , pollset ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 )
< < " (polling) pollset shutdown: " < < pollset ;
GrpcApplePollset * apple_pollset =
reinterpret_cast < GrpcApplePollset * > ( pollset ) ;
@ -323,7 +327,7 @@ static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
}
static void pollset_destroy ( grpc_pollset * pollset ) {
GRPC_POLLING_ TRACE ( " pollset destroy: %p " , pollset ) ;
GRPC_TRACE_VLOG ( apple_polling , 2 ) < < " (polling) pollset destroy: " < < pollset ;
GrpcApplePollset * apple_pollset =
reinterpret_cast < GrpcApplePollset * > ( pollset ) ;
apple_pollset - > ~ GrpcApplePollset ( ) ;