Git Product home page Git Product logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Agree. With your proposal, "this" is going to be private to the function?

Original comment by [email protected] on 18 Mar 2012 at 7:44

from plv8.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I implemented the code to support separate context.  In turn, my code is for 
per function, not per user.  The feature is experimental and need to set guc 
plv8.use_separate_context to on (default to off,) as the performance overhead 
is sometimes too big.

Original comment by [email protected] on 5 Apr 2012 at 10:22

  • Changed state: Fixed

from plv8.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I don't think this is the way to go, for several reasons. 

First, it's unlike what is done in other languages, and I think orthogonality 
would be good. 

Second, it should not be controlled by a GUC. This is a security issue, and we 
should not have a mode where information can leak across roles changes. What we 
should have is a hash of contexts keyed by role id, and switch to the correct 
context for the current role, if necessary creating it first. That will also 
have the side effect that globally saved data per role will simply be visible 
as one would expect.

My proposed startup functionality would be run in each context as it's created 
- in the vast majority of cases that would only be once per backend.

I was intending to work on this, and can undertake it if the design above is 
agreed.

Original comment by [email protected] on 18 Apr 2012 at 4:37

from plv8.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
The current GUC is for only trial purpose, and I don't intend to expose it as a 
normal option.  I agree my approach was wrong and should do it your way.  
However, I have another idea around it with the global namespace issue and 
yield function implementation, so you can of course work on it but I'd like to 
see your patch before commit.  Possibly my idea is unrelated topic here, but 
still I'm interested.

Original comment by [email protected] on 19 Apr 2012 at 8:22

  • Changed state: Accepted

from plv8.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I think this is done.

Original comment by [email protected] on 27 Apr 2012 at 12:56

  • Changed state: Fixed

from plv8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.