blue-jay / core Goto Github PK
View Code? Open in Web Editor NEWCore files for Blue Jay.
License: MIT License
Core files for Blue Jay.
License: MIT License
Which commit are you using?
de61a9f
Which operating system, processor architecture, and Go version are you using (go env
)?
Windows 10, Skylake i5 6600k,
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
}
},
What did you expect to see?
These config values used
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.
It's painful, but you have to do it.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.