el siguiente código:comportamiento dispatch_get_global_queue
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
for (int i=0; i<100000; i++) {
NSLog(@"HIGH 1 %d", i);
}
});
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
for (int i=0; i<100000; i++) {
NSLog(@"LOW %d", i);
}
});
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
for (int i=0; i<100000; i++) {
NSLog(@"HIGH 2 %d", i);
}
});
resultados en mezcla de 2 y bajos registros de alta 1, alta.
Cómo es que imprime registros high1 y high2 simultáneamente. ¿no están ambos blogs high1 y high2 en la misma cola? Entonces, ¿no debería terminar high1 block antes de comenzar a ejecutar high2 block?