Questions tagged [dispatch-queue]
231 questions
-1
votes
1 answer
IOS Swift How can I get value from an Async method
I am new to Swift and was wondering how can I get a value from an Async task. I have a function that gets Json data from an API on return I would like to get the value of a particular field outside of the async task... My code is below essentially I…

user1591668
- 2,591
- 5
- 41
- 84
-1
votes
1 answer
how to create dispatch queue in objective c?
I want to use below code in objective c.
var recordingQueue = DispatchQueue(label: "recordingQueue", qos: DispatchQoS.userInteractive)

iEhsan
- 47
- 1
- 10
-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…

drkibitz
- 507
- 5
- 15
-1
votes
1 answer
Serial Queue sync method interrupting UIView animation on Main
I am having an issue where I have a progress bar animation running on main being interrupted by sync calls to my Serial Queue.
Previously I did not use this queue as a serial queue, and only as an asynchronous queue -- however this lead to issues…

TheMuffinMan834
- 27
- 5
-3
votes
1 answer
How can I wait for an operation to be finished before continuing?
I have a main function (buttonPressed), that should print out a Jsonfile.
func buttonPressed {
var jasonFile = JSON()
jasonFile = getInfo(parA: 5, parB: 10) //1. takes some time
print(jsonFile) //prints before the JSON is get from the…

Koivader
- 1
-6
votes
3 answers
Run and Pause an ARSession in a specified period of time
I'm developing ARKit/Vision iOS app with gesture recognition. My app has a simple UI containing single UIView. There's no ARSCNView/ARSKView at all. I'm putting a sequence of captured ARFrames into CVPixelBuffer what then I use for…

Andy Jazz
- 49,178
- 17
- 136
- 220