Skip to content

Threads - sync vs async #39

@tamlyn

Description

@tamlyn

I'm trying to understand the benefit of using the async methods in this lib.

In node.bcrypt.js, the async methods use threads under the hood to keep the expensive computations out of the main Node process.

By contrast this lib uses nextTick/setImmediate which just delays the expensive computation until the current call stack has completed. Doesn't this mean that several users logging in in quick succession could lock up the application?

If so is there a recommended way to mitigate this issue (e.g. using child_process or similar)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions