irmen / Pyro5

Pyro 5 - Python remote objects
https://pyro5.readthedocs.io
MIT License
305 stars 36 forks source link

Question about mysterious delays #30

Closed tbhkuiper closed 3 years ago

tbhkuiper commented 4 years ago

This is a question for the community. I have implemented a client/server pair with callback in the manner suggested by Irmen. (Client is itself a server for the callbacks.) The server is experiencing occasional delays of a few tenths of seconds. The server has five threads, four in parallel and one collecting the results to be returned via the callback. All threads experience these delays, so that ms calculations take a few tenths of a second, roughly one time in ten. Could Pyro5 be causing this? Thanks.

irmen commented 4 years ago

Could it be that you're just seeing effects of Python's GIL?

tbhkuiper commented 4 years ago

On 9/4/20 3:34 PM, Irmen de Jong wrote:

Could it be that you're just seeing effects of Python's GIL?

Thank you for that.  I will investigate.

tbhkuiper commented 4 years ago

Yes, you were right. In a while loop waiting for a time to elapse I had pass instead of time.sleep(0.001). Thank you.

tbhkuiper commented 4 years ago

Incidentally, I had an audible clue I was ignoring -- the CPU fan coming on!

irmen commented 3 years ago

closing this as I believe the issue was resolved. If not feel free to re-open