[iOS, Swift] for a serial queue, sync and async will give same output ? as there is only 1 thread available.
i know sync will wait till method finish its execution. and async will return control immediately, without waiting for method to finish execution.
but in terms of serial queue. where there is only 1 thread. and In order for task2 to start task1 have to finish its execution.
looks like it will be giving same behavior on sync and async. Something is not correct here i feel. Can you give me example ?
submitting 4 async tasks to serial queue, that means task1 have to finish first, before task2 start, task2 have to finish first, before task3 start task3 have to finish first, before task4 start
and we are in serial queue, so only 1 thread available.