Open pckhoi opened 3 years ago
I think this is not a bug but a feature request. However, proxying cannot be disabled because it is used internally by pyodide type conversions, for instance any time a javascript function is called with a python object as an argument. This happens a lot.
The performance cost should also be small. I think the correct thing to do is add an FAQ item with this code as a suggestion.
We now have pyodide.isPyProxy
which should be used instead.
Hello, I'm running Pyodide in a web worker and whenever worker pass back result to the main thread and it happens to be a proxy, an error will be thrown because web worker can't serialize proxy. Right now this is what I do to handle it:
It would be nice if there's a way to disable proxying altogether and avoid the (small) performance cost.