Questions tagged [libdispatch]

The libdispatch project consists of the user space implementation of the Grand Central Dispatch API.

50 questions
0
votes
1 answer

Getting single main-thread on program using GCD

Using this as a frame of reference, is there any reason why the following example {could not} / {would not} result in the GCD Thread Pool running exclusively on the main thread? int main() { dispatch_queue_t myQueue =…
sam
  • 488
  • 8
  • 21
0
votes
1 answer

local dispatch_once value unsafe (transient memory) triggers warning

So on my spare time I'm working on an HTTP request 'engine'. What I'm trying to build is an 'engine' that generate a request / parse response to a generic object for an iphone app. And most of all, it should _allways_ callback the UI. Whatever…
adrian Coye
  • 173
  • 1
  • 14
0
votes
2 answers

Grand Central Dispatch without blocks

Is it possible to use GCD without blocks? Is there a way to use GCD using _f variant as mikeash says in his post. I searched around and there is no proof for either sides. is it possible or impossible. If its doable please give an example. /Selvin
Selvin
  • 12,333
  • 17
  • 59
  • 80
0
votes
1 answer

How to handle dispatch_queue_t dispatch_get_local_queue dispatch_queue_create EXC BAD ACCESS?

I have the following code dispatch_queue_t dispatch_get_local_queue() { static dispatch_queue_t _queue; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ _queue = dispatch_queue_create("com.github.blackraccoon", 0); …
ij_
  • 239
  • 1
  • 3
  • 11
-1
votes
2 answers

Is the following a safe use of dispatch_set_target_queue()?

What I want to do is create an indirect queue targeting the main queue. dispatch_queue_t myQueue = dispatch_queue_create("com.mydomain.my-main-queue", NULL); dispatch_set_target_queue(myQueue, dispatch_get_main_queue()); My ultimate goal is to use…
1 2 3
4