Skip to content

Just a fake, may have another better way#25

Open
skyblue wants to merge 1 commit intojmar777:masterfrom
skyblue:patch-1
Open

Just a fake, may have another better way#25
skyblue wants to merge 1 commit intojmar777:masterfrom
skyblue:patch-1

Conversation

@skyblue
Copy link
Copy Markdown

@skyblue skyblue commented Dec 26, 2014

eg:

    this.sleep = function(ms, cb){
        setTimeout(cb, ms)
    }
    suspend.run(function*(resume) {
        yield this.sleep(1000, resume())
    }, function(err, ret) {
        return next(err, ret)
    }, this)

    this.sleep = function(ms, cb){
        setTimeout(cb, ms)
    }
    suspend.run(function*(resume) {
        yield this.sleep(1000, resume())
    }, function(err, ret) {
        return next(err, ret)
    }, this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant