dispatch_write() and dispatch_read() usage
问题 I'm just playing with some GCD functions for writing and reading data to files. Two of these functions are dispatch_write() and dispatch_read() , which allow one to write and read data to a file descriptor without having to setup a new dispatch_io_t channel. So, I have the following code: #import <dispatch/dispatch.h> #import <stdio.h> #import <unistd.h> int main() { dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); int intbuffer[] = { 1, 2, 3, 4 };