[MacRuby-devel] GCD and NSURLConnection

Joshua Ballanco joshua.ballanco at apple.com
Sun Jan 17 22:34:57 PST 2010

I'd have to look at the NSURLConnection example again, but in the code from the bug report, there's no unsafe variable access in the Ruby code. Each Bar holds a reference to its own Foo in @foo, and we're dispatching to multiple Bars in turn. If you run that sample (you might need to tweak some of the parameters, depending on your machine) I think you'll find a fun error message that indicates this is definitely a MacRuby bug. :-)



On Jan 17, 2010, at 10:25 PM, steve ross wrote:

> But... both examples show multiple threads accessing a single instance variable without taking any precautions to make the access atomic. Could it be that kind of concurrency issue?
> Steve
> On Jan 17, 2010, at 6:01 PM, Joshua Ballanco wrote:
>> Hey Darin,
>> Looks like you're hitting https://www.macruby.org/trac/ticket/511
>> Cheers,
>> Josh
>> On Jan 17, 2010, at 4:52 PM, Darrin Eden wrote:
>>> Hi,
>>> I have yet to wrap my head around GCD, but that's not stopped me from breaking things anyway.
>>> I'd like to use an asynchronous queue with NSURLConnection. However, <http://gist.github.com/279665> results in a segmentation fault.
>>> Thoughts?
>>> Thanks,
>>>  -- Darrin
>>> _______________________________________________
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

More information about the MacRuby-devel mailing list