Giter VIP home page Giter VIP logo

vuency's People

Contributors

alidcast avatar jimt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

vuency's Issues

write tests to make sure that dropped instances don't run operation

There seems to be a bug in task cancellation demo that causes the running task instances count to turn negative. It occurs when you cancel an instance before it starts running (aka drop it). The finally block still seems to run even if the operation is dropped, but this shouldn't occur since dropped operations shouldn't even be started at all.

Task stays idle on unhandled exception

I've encountered a bug.
My code:

<script>
...
    remove: t(function*() {
                try {
                    yield fetch('http://domain.not.exists')          
                } catch (e) {
                    this.handleError(e)
                }
            }).flow('drop'),
...
</script>

<template>
    {{remove.isActive}}
</template>

Every time fetch('http://domain.not.exists') throws an exception I see error in console but task remains active so remove.isActive === true

Maybe I'm using vuency wrongly?

Add per instance params to task subscriptions

Need to better distinguish between the instance versus property subscriptions attached to the task.

task = t(taskFn) 
       .abort()   // property level
       .cancel() // instance level 

Also, are instance subscriptions necessary, or should most of the logic per task be the same?

taskInstance = task.run().cancel()

// could maybe even have them nested 
task = t(taskFn) 
       .abort()   
       // nth instance like css? 
       .forInstance(1)
             .cancel() 
       // per call? 
       .runOn('created')
           .onCance() 

Perhaps a better alternative could be to be able to give passed in params to subscriptions or to extend the task instance object.

Docs are broken

Link to the docs at the bottom of the readme is broken.

Just getting a 404 not found

Cheers,
Daniel

Figure out the necessary babel support

After adding support for async functions, the demos in the docs stopped working. After removing its support, they started working.

This is likely due to the fact that async support requires ES6 instance methods to check if a function is a generator or async function. Thus, as explained in babel/babel#3825 it might require babel-polyfill rather than babel-runtime.

Collab on shared lower-level concurrency lib?

Since releasing ember-concurrency, a lot of people have been asking me if/how/when they could use tasks for, say, node.js server development and other use cases. I've started to think about how to extract portions of e-c to a non-Ember-dependent library, and it'd be nice if the other various concurrency libs targeting specific UI libs (like vuency, perhaps react-concurrency) could share the same underlying primitives.

We talked about this briefly on Twitter but I figured I'd open an issue here early to get the ball rolling before we both write the same thing twice.

Clear timers and unset event listeners

Timers and listeners need to be cleaned up so they do not outlive the span of the running task instance.

In order to this for each instance, I need a way to either:

  • Identify the timer with the task instance so that it can be cleared when the task instance is canceled.
  • Extend the promise to attach the necessary data that is needed to cancel the timer. (Though this might not be possible yet - see babel/babel#1120).
  • Figure out a weak map implementation and create the timers/listeners as runnable and cancelable objects. (Limitation here is that the timeout helper would only work for generator functions since they give access to the return value of each yield, thought this might not even matter since ongoing async functions can't be canceled anyways.)

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.