Comments (5)
Potentially this could be considered as MRI being too strict? Forbidding Mutex#synchronize in trap seems unfortunate, even though indeed there is a risk of deadlock since the main thread might already have the Mutex and it's not reentrant.
I think a general advice here is to run the minimum code in trap like just setting a flag or raising an exception.
from dry-configurable.
Looks like concurrent map cannot be used in this context so I'm not sure if we can do anything about this, unless there's no need to use concurrent map there?
from dry-configurable.
there's no need to use concurrent map there?
Dunno. If dry-configurable should not be used from the trap context, it should be pointed out in the docs (and in a rather loud way). I don't see any non-implementation reason for it not to be usable tbh.
from dry-configurable.
I agree with @eregon, I don't think we can or should fix this
from dry-configurable.
Potentially this could be considered as MRI being too strict? Forbidding Mutex#synchronize in trap seems unfortunate, even though indeed there is a risk of deadlock since the main thread might already have the Mutex and it's not reentrant.
Well this is what I do ;) just wanted to set some things based on a config that in theory should just be readable without having to have mutex. Guess I was wrong.
Since I already have a bypass in place I will close this one, though I do think it would be good to include this case in the readme or the docs.
from dry-configurable.
Related Issues (20)
- `finalize!` should freeze config recursively
- Leave setting values as `Undefined` rather than coercing to `nil` for un-set settings HOT 2
- Add `Settings#replace` to support wholesale replacement of settings in a configurable object
- Understanding the thread safety claim - random sum every program invocation HOT 1
- 0.13.0 release checklist HOT 10
- default values cannot be lazy evaluated
- Unexpected Dry::Schema::MissingMessageError HOT 1
- Add Zeitwerk autoloader HOT 1
- `v0.16.0` of dry-configurable breaks `require "dry-validation"` HOT 2
- 0.16.0 breaks Sinatra config_file HOT 9
- 0.16.0 breaking change to how settings with a `constructor` behave HOT 2
- 0.16.0 breaks Zeitwerk integration for other gems HOT 1
- Autoloading with zeitwerk results in uninitialized constant Dry::Core::ClassAttributes::IDENTITY HOT 1
- 0.15.0 broke `config.update` with constuctor requiring nested value HOT 1
- As an aside, I've also discovered similar failures if I do the same thing to the `pluralize_spec`: HOT 1
- Redefining class regression: undefined method `config' for class HOT 5
- Raise more meaningful exception when included more than once
- Config#update does not return self HOT 1
- Values are being memoized between config instances HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dry-configurable.