Skip to content

Commit

Permalink
Set worker.current
Browse files Browse the repository at this point in the history
  • Loading branch information
lowentropy committed Dec 10, 2013
1 parent dc9a8eb commit 6c1b03a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/worker.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,13 @@ class Worker
console.log "worker: no need to run fiber (#{wat})"
the_result = result
if the_result != undefined
Worker.current = this
console.log "worker: no need to yield (#{wat})"
return the_result
yielded = true
console.log "worker: helper yielding (#{wat})"
v = Fiber.yield()
Worker.current = this
console.log "worker: helper resumed (#{wat})"
v
else
Expand Down

0 comments on commit 6c1b03a

Please sign in to comment.