search for: dispatch_queue_priority_low

Displaying 1 result from an estimated 1 matches for "dispatch_queue_priority_low".

2015 Apr 08
2
[LLVMdev] __sync_add_and_fetch in objc block for global variable on ARM
...{      ...         char* name;         asprintf(&name, "test.overcommit.%d", i);         dispatch_queue_t queue = dispatch_queue_create(name, NULL);         free(name);         dispatch_set_target_queue(queue, dispatch_get_global_queue(0,                     dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)));         /* async queue */         dispatch_async(queue, ^{            __sync_add_and_fetch(&count, 1); //<< Here count is corrupted in case of number of threads> ~5            printf("count addr %p, value %d\n", &count, count);            fflush(stdout);         }...