ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.

MIT License

Downloads
447.6K
Stars
688
Committers
76

Bot releases are hidden (Show)

ember-concurrency - .evented() and task lifecycle events

Published by machty over 6 years ago

0.8.18

Thanks to @maxfierke for implementing this feature.

ember-concurrency - waitFor* + Promise helpers

Published by machty over 6 years ago

0.8.17

  • waitForEvent/Queue/Property helpers now work with the various
    promise helpers (e.g. all and race)
ember-concurrency - waitForProperty value shorthand

Published by machty over 6 years ago

0.8.16

  • Allow passing a non-Function value to waitForProperty() as
    a shortcut for waiting for the observed property to ===
    that value.
ember-concurrency - waitForProperty()

Published by machty over 6 years ago

0.8.15

  • Added waitForProperty() to pause execution until a property
    on an Ember Object becomes a certain value.

https://ember-concurrency.com/docs/events

ember-concurrency - waitForEvent() support for native DOM EventTargets

Published by machty over 6 years ago

  • waitForEvent() support for native DOM EventTargets
    (instead of just Ember / jQuery objects) (#187)
ember-concurrency - encapsulated tasks

Published by machty almost 7 years ago

0.8.12

  • Officially release and document "Encapsulated Tasks", which
    are tasks that can maintain/mutate their own state without
    having direct access to the host object's state. In conjunction
    with Derived State, this allows for some nice patterns for
    containing state/logic/mutations within the tasks, rather
    than requiring that state/events generated by tasks live on /
    bleed into the host objects.
ember-concurrency - more helpful error messages

Published by machty over 7 years ago

0.8.7

  • Added helpful error when improperly trying to perform a
    task via this.taskName.perform()
ember-concurrency - cancelation .debug()ging

Published by machty over 7 years ago

0.8.6

  • Add .debug() Task Modifier and EmberENV.DEBUG_TASKS to log
    the reason a task is canceled, e.g. "TaskInstance 'doStuff' was
    canceled because the object it lives on was destroyed or unrendered"
ember-concurrency - better cancelation messaging

Published by machty over 7 years ago

0.8.3

  • Added informative messages as to the root cause of a
    TaskCancelation, e.g.
    "TaskInstance 'doStuff' was canceled because .cancel() was explicitly called"
    "TaskInstance 'doStuff' was canceled because .cancelAll() was explicitly called on the Task"
    "TaskInstance 'doStuff' was canceled because it belongs to a 'restartable' Task that was .perform()ed again"
ember-concurrency - as-sync-as-reasonable

Published by machty over 7 years ago

0.8.2

  • Reverted some of the changes introduced in 0.8.0; in particular,
    while the first "slice" of a task function executes synchronously
    when performed, advancing the task is deferred to a run loop queue.
    This fixes some regressions caused by the overzealous
    as-sync-as-possible scheduling introduced in 0.8.0
    (#148, #138)
ember-concurrency -

Published by machty over 7 years ago

  • removed stray debugger from library code :( :( :( #ConferenceDrivenDevelopment
ember-concurrency - perf + sync start

Published by machty over 7 years ago

0.8.0

  • POSSIBLE BREAKING CHANGE: the internal task scheduler
    has been rewritten to be more performant, but to also
    more immediately start executing task functions. Prior
    to this version, perform()ing a task wouldn't actually
    start executing the task function until the actions queue
    on the run loop; this behavior was inconsistent with the timing
    of async functions, and meant that certain lifecycle hooks
    that depended on logic being run synchronously couldn't be
    used with ember-concurrency Tasks (because they already
    missed their window of execution). This is unlikely to
    break anyone's apps, but it's possible some apps out there
    have subtle timing dependencies on tasks running within
    run loop queues, so it's better to announce this as a possible
    breaking change. (#107)
  • Derived state: Task Instances now have an additional
    isSuccessful and isError property (#119)
  • Derived state: Tasks expose performCount that tracks
    how many times a task has been performed.
  • waitForEvent and waitForQueue for pausing the task until
    a jQuery / Ember event occurs, or until a particular
    run loop queue has been reached.
ember-concurrency - look ma no .get('taskName')

Published by machty about 8 years ago

You can now replace all instances of

this.get('myTask').perform();

with

this.myTask.perform();
ember-concurrency - allSettled

Published by machty about 8 years ago

ember-concurrency - Arbitrary nestings of addons

Published by machty over 8 years ago

0.7.7

  • Upgraded ember-maybe-import-regenerator so that other
    addons can consume/depend on ember-concurrency without
    making the end user have to make any additional
    configuration to support transpiled generator function
    syntax.
ember-concurrency - no more babel.includePolyfill:true

Published by machty over 8 years ago

0.7.5

  • You no longer have to set includePolyfill:true in
    ember-cli-build.js as a requirement for using
    ember-concurrency. regenerator-runtime is now
    provided by https://github.com/machty/ember-maybe-import-regenerator,
    which gracefully no-ops if you still want to keep
    includePolyfill:true. Babel's polyfill is 98kb minified,
    whereas the regenerator runtime is only 4kb minified.
ember-concurrency -

Published by machty over 8 years ago

0.7.2

  • (perform) and (cancel-all) helpers no longer cause run loop autoruns
  • The .keepLatest() task modifier has been redocumented due
    to popular demand; it's useful for when you want to enqueue
    only the most recent intermediate .perform() and drop everything
    in between.
ember-concurrency - Ember 1.13.0 support

Published by machty over 8 years ago

ember-concurrency - uncatchable TaskCancelation

Published by machty over 8 years ago

0.7.0

  • within a task generator function, TaskCancelation "errors" are
    longer "catchable" in the catch block of a try/catch. This means
    you no longer have to check if the error thrown is a cancelation
    in order to handle it differently than an exception.
  • That said, since promises have no concept of cancelation, if
    you perform a task within a promise (or you call
    someTask.perform().then(...).catch(...)), then any promise
    catch handlers will be called with TaskCancelation "errors",
    and if you need to distinguish between cancelation and exceptions
    thrown, you can import and use the new didCancel utility function,
    which returns true if the error passed to it is a TaskCancelation.
    Previously, the only safe way to test this was to check
    err && err.name === 'TaskCancelation'; now you can just
    import { didCancel } from 'ember-concurrency' and
    check didCancel(err).
ember-concurrency -

Published by machty over 8 years ago

0.6.3

  • bugfix: errors that bubble throw arbitrary depths of child tasks
    will only call window/Ember.onerror once

Basically this release fixes what 0.6.2 only partially fixed.

Package Rankings
Top 1.25% on Npmjs.org
Top 9.55% on Proxy.golang.org
Badges
Extracted from project README
Build Status NPM Ember Observer Score