Page 1 of 1

System design: explicit refcounting

Posted: Fri Apr 27, 2012 5:08 pm
by target.san
Hi!
My question is mostly to developers.
Is the current scheme with explicit retain-release a strict design solution and won't be changed?
I mean, do pull requests with code tending to use value semantics need to be rewritten to on-heap object management?

In particular, I'm currently writing enhancement for thread module, and I've mostly redone Variant type to use as little allocations as possible, making it effectively a value type. And I tend to re-do all places where variant is used in the same way.

So my main question is, are such changes potentially acceptable?

Thanks!

Re: System design: explicit refcounting

Posted: Fri Apr 27, 2012 6:53 pm
by bartbes
Everything entering lua has to use this, that's pretty much the only rule.
Sadly, however, I fear your work on threading won't make it in, since I've recently been working on rewriting the entire module.

Re: System design: explicit refcounting

Posted: Fri Apr 27, 2012 7:10 pm
by target.san
Sad things you say. I've managed to write and test to some degree passing complex types between threads, including parameter/result tuples. Okay, I'll post a pull request for you to take anything you find suitable.

BTW, could you please point out what parts of thread module will be re-done, so I won't be coding things scheduled for replacement?
My next idea was to write lock-free channels to replace existing event chains and inter-thread messaging.