Giter VIP home page Giter VIP logo

reaktor's People

Contributors

floschu avatar

Stargazers

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

Watchers

 avatar

Forkers

devfinex

reaktor's Issues

Thread safety of `currentState`

While writing a reactor that would cause a resource load to occur, I wanted to guard against loading the same resource… so naturally I would consult currentState in my mutate function… but then I started to think about threading. I had previously assumed that Reactor might provide some threading guarantees as other similar libraries do, but as far as I can tell DefaultReactor will emit Actions on whatever thread the ActionRelay is used from. Because of this, I believe a stale read of currentState could be possible. Do you agree?

Currently I am mitigating this (disclaimer: I haven't attempted to create a pathological scenario to test this out, so it's still conjecture) by using transformAction() to observeOn(Schedulers.single()). I'd love to hear your thoughts about this!

Also: thanks for writing such a clear & concise state management library for Android! It fits like a glove with our existing patterns, and we see ourselves standardizing on its usage across the app.

Reaktor.handleErrorsWith() uses libraries BuildConfig.DEBUG flag

The flag crashInDebug which can be set with the Reaktor.handleErrorsWith() method is coupled to only escalate errors as app crashes if the library module is compiled in debug, as this flag is coupled with the libraries BuildConfig.DEBUG flag:

get() = Reaktor.crashInDebug && BuildConfig.DEBUG

I would propose to either consider using another way to check whether the app is in debug (as for example ApplicationInfo.FLAG_DEBUGGABLE, which would add an android dependency into the core-reaktor), or decoupling the flag from a debug state and make it the developers choice / control, when the errors should be escalated as fatal crashes.

(Originally found here: diamirio/AndroidAppTemplate#11 (comment))

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.