Edward Lee
197c2ff78d
Lazily listen for quit-application on the first sync-async call and bail out if the notification is sent while waiting for the callback.
2009-10-08 12:07:38 -07:00
Edward Lee
be93c8847a
Write setTimeout nsITimer.notify in a way that keeps the timer object alive.
2009-10-07 19:02:28 -07:00
Edward Lee
206fa18436
Change cb.fail() cb.throw() that also throws the data passed in to stop the caller execution.
2009-06-03 19:03:44 -07:00
Edward Lee
dc38fea1b7
Allow async. functions to trigger an exception at the sync. function caller by doing onComplete.fail().
2009-06-03 18:50:06 -07:00
Edward Lee
aac81d898b
Prevent outside access to internal callback data but still allow Sync to access that data.
2009-06-03 18:08:08 -07:00
Edward Lee
84762772cb
Remove Sync().onComplete functionality changing ability and replace with Sync.withCb().
2009-06-03 17:25:52 -07:00
Edward Lee
a3bdaf8570
Allow sync. functions to be called more than once and have each sync. invocation instance separate from each other.
2009-06-02 21:17:04 -07:00
Edward Lee
ecedb85ce4
Remove Function.prototype.sync/bind and Sync.sync and replace with just Sync as the one-simple-great way to make things sync.
2009-06-02 18:58:46 -07:00
Edward Lee
a1e71e87bc
Allow extracting of the sync. function callback to make the sync. call not inject the callback.
2009-06-01 23:30:45 -07:00
Edward Lee
86582b0d9e
Add Function.prototype.syncBind to allow binding of this to the sync. function.
2009-06-01 23:08:21 -07:00
Edward Lee
d5cd2b78d1
Add Sync.sync as another way to make sync. functions (in addition to Function.prototype).
2009-06-01 22:53:45 -07:00
Edward Lee
bf28edac11
Just implement Sync.sleep with sleep.sync instead wrapping it first.
2009-06-01 19:13:12 -07:00
Edward Lee
f1eb0b1fd1
Directly add additional properties to Sync instead of overwriting __proto__.
2009-06-01 19:03:07 -07:00
Edward Lee
d08df5167b
Change boilerplate of Function.prototype.sync = Sync.sync to just Sync(Function).
...
Rewrite the core sync implementation to eventually allow binding of thisArgs, extracting of onComplete callback, and not always injecting the callback as the first arg of the async function.
2009-06-01 18:41:21 -07:00
Edward Lee
c99f974da2
Convert sync to single line comments and lets
...
--HG--
extra : rebase_source : a1c8dab75a930abb3a4fbfd37e8ba69d64034fdc
2009-06-01 11:22:23 -07:00
Myk Melez
2473a613d6
test using the Sync.sync method added to the Function prototype to create our own 'synchronous asynchronous' function; simplify Sync.sleep implementation, removing unnecessary callback indirection
2009-05-27 22:54:32 -07:00
Myk Melez
20a51c6202
initial implementation of Sync module for doing asynchronous operations in a synchronous fashion
2009-05-27 22:24:15 -07:00