Skip to content

[Feature Request] Add a real async run method to onnxruntime-node #19611

@segevfiner

Description

@segevfiner

Describe the feature request

There should really be a true async version of run in onnxruntime-node, running computationally intensive things on the event loop will stop everything else from happening while it is running, e.g. a web server from answering requests.

This can be done by wrapping RunAsync behind a Napi::Promise and Napi::TypedThreadSafeFunction to run on the onnxruntime thread pool, or Napi::AsyncWorker for the Node.js/libuv thread pool.

See #19610

Describe scenario use case

Don't block the event loop while running inference, which is naturally computationally intensive.

Metadata

Metadata

Assignees

Labels

feature requestrequest for unsupported feature or enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions