Closed hulxv closed 4 months ago
@Hulxv in order to make MetaCall work properly, the metacall_initialize should be called in the main thread. I am not sure how the macro tokio::main modifies this behavior, it may be one reason why this is failing.
Another thing we can do is to use async calls instead of sync ones, this may also help to solve that issue. It would be cool to make an example like this that works out of the box, but I am a bit busy in other parts.
Do you know if it's possible to initialize tokio without that macro, and initialize metacall on the very beginning of the application?
This is partially solved, it needs to be properly refactored and extended to all the loader implementation.. but the workaround is done: https://github.com/metacall/core/pull/502
🐛 Bug Report
During do some benchmarks to decide what the Rust web framework I will use as a HTTP server for the SSR framework project. I made a simple HTTP server using different frameworks and loading this
ts
script:using this rust code (for example):
I use wrk to do an HTTP benchmark, If I do this benchmark with multiple threads and multiple connections using this command
For some reason the HTTP server crashed and got this errors:
The benchmark done successfully just if I used a single thread and one connection
Expected Behavior
Works fine without crashing
Current Behavior
the program crashes
Steps to Reproduce
Context (Environment)
Detailed Description
check the source code of this experiment if you want