diff --git a/Channel/Sources/EDOSocket.m b/Channel/Sources/EDOSocket.m index 3f6246b..6dcb7fd 100644 --- a/Channel/Sources/EDOSocket.m +++ b/Channel/Sources/EDOSocket.m @@ -175,7 +175,8 @@ + (void)connectWithTCPPort:(UInt16)port queue:(dispatch_queue_t)queue connectedBlock:(EDOSocketConnectedBlock)block { block = block ?: gNoOpHandlerBlock; - queue = queue ?: dispatch_queue_create("com.google.edo.connectSocket", DISPATCH_QUEUE_SERIAL); + dispatch_queue_attr_t queueAttributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, QOS_CLASS_USER_INTERACTIVE, 0); + queue = queue ?: dispatch_queue_create("com.google.edo.connectSocket", queueAttributes); int socketErr = 0; dispatch_fd_t socketFD = edo_CreateSocket(&socketErr); diff --git a/Channel/Sources/EDOSocketChannel.m b/Channel/Sources/EDOSocketChannel.m index 5661cb3..2c01b61 100644 --- a/Channel/Sources/EDOSocketChannel.m +++ b/Channel/Sources/EDOSocketChannel.m @@ -62,8 +62,9 @@ - (instancetype)init { if (self) { // For internal IO and event handlers, it is equivalent to creating it as a serial queue as they // are not reentrant and only one block will be scheduled by dispatch io and dispatch source. + dispatch_queue_attr_t queueAttributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, QOS_CLASS_USER_INTERACTIVE, 0); _handlerQueue = - dispatch_queue_create("com.google.edo.socketChannel.handler", DISPATCH_QUEUE_SERIAL); + dispatch_queue_create("com.google.edo.socketChannel.handler", queueAttributes); } return self; }