Disable gevent on non-Windows. #398
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-02#398
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pow_deadlock_fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #312 and #396. Makes #313 redundant.
What does gevent do for Windows users? From what I remember an OSX user wanted it and added it.
I gather its primary advantage is nonblocking IO. That is also its primary disadvantage when doing multiprocessing without care, since a lot of stuff in Python doesn't expect things like the socket module to by asynchronous. Based on what I dug up on the internet, its a problem especially common on POSIX-compliant machines. The problems seem common enough (see cited issues above, and a couple threads on forum) that I think we should immediately disable gevent at least for Linux and therefore probably for OSX too. Another option is to just revert
0aa7efa
.FWIW, I just confirmed that I've been running just fine on OSX without gevent installed.
So we don't really need it for OSX.
Aye, it's not a requirement. The idea is to improve performance by using green threads on various components like the socket module. But when that attempt to improve performance vitiates PoW multiprocessing and, according to #396 makes some sockets fail in yet-to-debug circumstances, I'm not wont to consider it an improvement.
BTW, the reason I noted that we could revert
0aa7efa
and not the rest of the gevent stuff is because I have yet to encounter or hear of gevent problems on the Qt side of things. (That said, I am not convinced the GUI is even getting the gevent patches if socket is imported first in bitmessagemain.py without the patches... but I haven't looked into this.)There was a pull request from someone a while back which added gevent and added a background worker thread which doesn't do anything currently. I will manually take it all out (and enjoy it).
8-)