aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStephen Blott2015-05-10 12:07:48 +0100
committerStephen Blott2015-05-10 12:07:48 +0100
commit9bc1c215e3857d109fca2a073fd50799e0021cc8 (patch)
tree838f55105f742aa8a6107441aa848cd49a248e3d /lib
parentcdf87b7a870303df9baee7161b15362242f65dcb (diff)
downloadvimium-9bc1c215e3857d109fca2a073fd50799e0021cc8.tar.bz2
Search completion; fix synchronisation issue.
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index a1ed23c2..1ff33300 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -274,14 +274,14 @@ class SimpleCache
@rotate()
# This is a simple class for the common case where we want to use some data value which may be immediately
-# available, or for which we may have to wait. It implements the use-immediately-or-wait queue, and calls the
-# function to fetch the data asynchronously.
+# available, or for which we may have to wait. It implements a use-immediately-or-wait queue, and calls the
+# fetch function to fetch the data asynchronously.
class AsyncDataFetcher
constructor: (fetch) ->
@data = null
@queue = []
- fetch (@data) =>
- Utils.nextTick =>
+ Utils.nextTick =>
+ fetch (@data) =>
callback @data for callback in @queue
@queue = null