Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Vogel authored and Brad Vogel committed Oct 11, 2014
1 parent fd45cfa commit d2f9841
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sync.js
Expand Up @@ -58,7 +58,7 @@ sync.await = Fiber.yield

// Creates fiber-aware asynchronous callback resuming current fiber when it will be finished.
sync.defer = function(){
if(!Fiber.current) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!Fiber.current) throw new Error("no current Fiber, defer can't be used without Fiber!")
if(Fiber.current._syncParallel) return sync.deferParallel()
else return sync.deferSerial()
}
Expand Down Expand Up @@ -89,7 +89,7 @@ sync.deferWithTimeout = function(timeout, message){
//
sync.deferSerial = function(){
var fiber = Fiber.current
if(!fiber) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!fiber) throw new Error("no current Fiber, defer can't be used without Fiber!")

// Returning asynchronous callback.
return function(err, result){
Expand All @@ -109,7 +109,7 @@ sync.deferSerial = function(){

sync.deferParallel = function(){
var fiber = Fiber.current
if(!fiber) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!fiber) throw new Error("no current Fiber, defer can't be used without Fiber!")
if(!fiber._syncParallel) throw new Error("invalid usage, should be called in parallel mode!")
var data = fiber._syncParallel

Expand Down Expand Up @@ -139,14 +139,14 @@ sync.deferParallel = function(){
}

sync.defers = function(){
if(!Fiber.current) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!Fiber.current) throw new Error("no current Fiber, defer can't be used without Fiber!")
if(Fiber.current._syncParallel) return sync.defersParallel.apply(sync, arguments)
else return sync.defersSerial.apply(sync, arguments)
}

sync.defersSerial = function(){
var fiber = Fiber.current;
if(!fiber) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!fiber) throw new Error("no current Fiber, defer can't be used without Fiber!")

var kwds = Array.prototype.slice.call(arguments)
// Returning asynchronous callback.
Expand Down Expand Up @@ -176,7 +176,7 @@ sync.defersSerial = function(){

sync.defersParallel = function(){
var fiber = Fiber.current
if(!fiber) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!fiber) throw new Error("no current Fiber, defer can't be used without Fiber!")
if(!fiber._syncParallel) throw new Error("invalid usage, should be called in parallel mode!")
var data = fiber._syncParallel
// Counting amount of `defer` calls.
Expand Down Expand Up @@ -218,7 +218,7 @@ sync.defersParallel = function(){
// performed in parallel.
sync.parallel = function(cb){
var fiber = Fiber.current
if(!fiber) throw new Error("no current Fiber, defer can'b be used without Fiber!")
if(!fiber) throw new Error("no current Fiber, defer can't be used without Fiber!")

// Enabling `defer` calls to be performed in parallel.
// There's an important note - error in any parallel call will result in aborting
Expand Down

0 comments on commit d2f9841

Please sign in to comment.