WebReflection / coincident

An Atomics based Proxy to simplify, and synchronize, Worker related tasks.
MIT License
203 stars 3 forks source link

coincident function cannot return an array #19

Closed bugzpodder closed 1 year ago

bugzpodder commented 1 year ago

I have a function:

def find_imports(code):
    print(code, pyodide.code.find_imports(code))
    return pyodide.code.find_imports(code)

xworker.sync.find_imports = find_imports

This returns a python array and it becomes a blank object in the main thread. Change the return statement to return pyodide.code.find_imports(code)[0] (ie a string) and i was able to get the result out

WebReflection commented 1 year ago

Same story as others ... you are likely confusing projects ... coincident has nothing to do with Python, it's a module to orchestrate Atomics via Proxy. Answered in here: https://github.com/WebReflection/coincident/issues/20#issuecomment-1713403504