Re: Can I create a thread with a runloop and a dispatch queue?
Re: Can I create a thread with a runloop and a dispatch queue?
- Subject: Re: Can I create a thread with a runloop and a dispatch queue?
- From: Kyle Sluder <email@hidden>
- Date: Thu, 03 Oct 2013 12:07:10 -0700
On Thu, Oct 3, 2013, at 12:05 PM, Jens Alfke wrote:
>
> Because I’ve got tens of thousands of lines of code*, a lot of which does
> some tricky asynchronous work using the runloop/thread paradigm, and I
> don’t want to break it by rewriting all of it en masse to use GCD. If I
> could start using GCD in new parts of the code that would be great, but
> when I tried to do so I ran into these impedance mismatches and had to
> tear it out.
They're fundamentally different ways of doing multiprocessing.
If you need thread-affinity, you can't use GCD. It's not designed that
way.
You _could_ have all your async queues target a serial queue that then
enqueues a bunch of blocks on a specific thread, but why?
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden