Ken Miller

Results 38 comments of Ken Miller

You can do this with `.where(:name).eq("ar", NSCaseInsensitivePredicateOption)` which admittedly does not roll right off the tongue. We could make friendlier version with symbols.

I think the example is wrong, not sure how that happened. Should be (from memory) ``` cdq.contexts.on(:network) do cdq.save(:network, always_wait: true) cdq.save(:main) end ```

Right, the context isn't on the stack at that point... there's definitely a piece of the puzzle missing here. What behavior would you naively expect? Seems like it should have...

The stack exists per-thread and always has. For a private thread, you want it to do its work and complete, and let the main thread save down to the root...

Having to separately save the main stack is precisely what you are supposed to do in this case. If you look at the last pattern documented [here](https://github.com/infinitered/cdq/wiki/New-Threading-and-Context-Stack-model) you can see...

Oh and to be extra clear: stacks are per-thread. Every time you switch threads you have to set it up, or used named contexts everywhere.

Yeah, the parent/child relationship is totally separate from the stack, by design. Could do a better job of explaining that.

Yes, the first time you use that thread there will be no stack, but the second time it will still be there. The stack is stored in thread-local storage.

It's not trivial to do that because of the way core data works. You can't do it right in CDQManagedObject because CoreData will subclass your class and then add the...