| 40 | */ |
| 41 | |
| 42 | void entryWithTSFN(ThreadSafeFunction tsfn, int threadId) { |
| 43 | std::this_thread::sleep_for(std::chrono::milliseconds(std::rand() % 100 + 1)); |
| 44 | tsfn.BlockingCall([=](Napi::Env env, Function callback) { |
| 45 | callback.Call({Number::New(env, static_cast<double>(threadId))}); |
| 46 | }); |
| 47 | tsfn.Release(); |
| 48 | } |
| 49 | |
| 50 | static Value TestWithTSFN(const CallbackInfo& info) { |
| 51 | int threadCount = info[0].As<Number>().Int32Value(); |
nothing calls this directly
no test coverage detected