Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

gevent error when using accross threads #51

@alex-v-dev

Description

@alex-v-dev

Hi !

I am using mprpc in a large-ish code base, and it might happen that sometimes rpc calls are made from another thread than the main. Is there anything I can do about this ? This is giving the following error :

File "mprpc/client.pyx", line 138, in mprpc.client.RPCClient.call (mprpc/client.c:2545) data = self._socket.recv(SOCKET_RECV_SIZE) File "D:\_DEV_GIT\avPipe_GIT\avPipe\Dependencies\PyLibraries\MSVC14\gevent\_socket2.py", line 295, in recv self._wait(self._read_event) File "src/gevent/_hub_primitives.py", line 265, in gevent.__hub_primitives.wait_on_socket File "src/gevent/_hub_primitives.py", line 266, in gevent.__hub_primitives.wait_on_socket File "src/gevent/_hub_primitives.py", line 252, in gevent.__hub_primitives._primitive_wait File "src/gevent/_hub_primitives.py", line 46, in gevent.__hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_hub_primitives.py", line 46, in gevent.__hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_hub_primitives.py", line 55, in gevent.__hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_waiter.py", line 151, in gevent.__waiter.Waiter.get File "src/gevent/_greenlet_primitives.py", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 63, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/__greenlet_primitives.pxd", line 35, in gevent.__greenlet_primitives._greenlet_switch error: cannot switch to a different thread

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions