Giter Site home page Giter Site logo

core's People

Contributors

josephspurrier avatar lansana avatar tgulacsi avatar turalasgar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

view.Info contains three mutex values which are copied by the flight package

Commit: e99a706
Code: core/view/view.go

In the view.Info struct there are three fields of type sync.RWMutex - mutex, extendMutex and modifyMutex.

All of these mutexes are used to manage access to reference type fields in the struct - templateCollection, extendList and modifyList. If the struct is copied, the mutexes are copied but the maps and slice referenced by the fields are not. Two goroutines with different copies of the view.Info struct will be working with the same maps and slice but different mutexes. A lock acquired by one goroutine will not prevent access to these fields by another goroutine with a different copy of view.Info.

As I understand it, the mutexes should be outside the struct, in the package.

Edit: I made the first version of this issue far more complicated than it needed to be. Hopefully this is clearer.

Session options in env.json not used in session.go

  1. Which commit are you using?
    de61a9f

  2. Which operating system, processor architecture, and Go version are you using (go env)?
    Windows 10, Skylake i5 6600k,

  3. What did you do?
    Set the session config values in env.json:

	"Session": {
    "AuthKey":"key",
    "EncryptKey":"key",
    "CSRFKey":"key",
		"Name": "sess",
		"Options": {
			"Path": "/",
			"Domain": "",
			"MaxAge": 28800,
			"Secure": false,
			"HttpOnly": true
		}
	},
  1. What did you expect to see?
    These config values used

  2. What did you actually see?
    The values in the config were not used

It seems like adding the line i.store.Options = &i.Options to the end of session.SetupConfig (before return nil) fixes it. I've been meaning to submit a pull request, but I haven't had the time to write a test yet, so I figured I would file this here in case someone else can get to it first.

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.