I am making concurrent calls to getnameinfo() by submitting each call to a separate dispatch_queue.
If there is some problem or slowness in a dns lookup I would like to cancel that call before the default timeout (30 secs?) has passed.
Is it possible to raise SIGALRM to target a specific dispatch_queue in order to interrupt whatever system call getnameinfo() is hanging on. The dispatch_sources approach seems to invoke the signal handler from a specified queue but I'm not sure which of my dispatch queues will actually receive the interrupt.
Or is there some other sneaky way to cause getnameinfo() to return early.
Sorry if this is not the correct forum, but I am currently working with Swift and managing my dispatch_queues from Swift.
Regards
Bryan