I’m not familiar with C blocks and GCD.
How would Python code look with that approach?
> On 20 Jun 2016, at 6:02 PM, Michał Domański <mdom...@gmail.com> wrote:
> 
> So I actually thought about similar approach. I was curious what do you think 
> about approach to concurrency similar to what Apple did with C blocks and 
> GCD. That is: enable threading but instead of the STM approach have fully 
> explicit mutations within atomic blocks
> 
> 2016-06-20 16:53 GMT+02:00 Armin Rigo <ar...@tunes.org 
> <mailto:ar...@tunes.org>>:
> Hi Omer,
> 
> On 20 June 2016 at 08:51, Omer Katz <omer.d...@gmail.com 
> <mailto:omer.d...@gmail.com>> wrote:
> > As for implementation, if we can trace the code running in the thread and
> > ensure it's not mutating global state and that CPyExt is never used during
> > the thread's course we can simply release the GIL when such a thread is run.
> 
> That's a very hand-wavy and vague description.  To start with, how do
> you define exactly "not mutating global state"?  We are not allowed to
> write to any of the objects that existed before we started the thread?
>  It may be possible to have such an implementation, yes.  Actually,
> that's probably easy: tweak the STM code to crash instead of doing
> something more complicated when we write to an old object.
> 
> I'm not sure how useful that would be---or how useful PyParallel is on
> CPython.  Maybe if you can point us to real usages of PyParallel it
> would be a start.
> 
> 
> A bientôt,
> 
> Armin.
> _______________________________________________
> pypy-dev mailing list
> pypy-dev@python.org <mailto:pypy-dev@python.org>
> https://mail.python.org/mailman/listinfo/pypy-dev 
> <https://mail.python.org/mailman/listinfo/pypy-dev>
> 
> 
> 
> -- 
> ---------------------------
> Michał Domański

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to