Pass JS function to an Op that can be called after the Op ends
Is there a way to have JS function to an Op that can be called after the Op ends?
The problem is that to call a function, v8::HandleScope is needed but only the reference to it is passed to an op.
The use case is: the op registers filesystem watcher and when change detected it should call js function that was passed as a parameter to and op. The runtime is kept running by a pending promise at another not related place.
Also I am still using op v1 so something may have changed in v2 which I am not aware of
The problem is that to call a function, v8::HandleScope is needed but only the reference to it is passed to an op.
The use case is: the op registers filesystem watcher and when change detected it should call js function that was passed as a parameter to and op. The runtime is kept running by a pending promise at another not related place.
Also I am still using op v1 so something may have changed in v2 which I am not aware of
