-
-
Notifications
You must be signed in to change notification settings - Fork 245
s/greenlets/threads/g #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you remember how well threads worked compared to greenlets? |
I think it was about twice the latency, but I should measure.
|
If someone wants to look at this, the process be doing about the opposite of commit 2e54cbb to move us back to threads, then playing around to see how it feels. |
I started #681 to work on this. I need some dedicated time with a whiteboard to really dive in and understand the threading model, but this looks promising so far. |
(I've obviously made no progress on this, other implementations welcome!) |
I think using threads the same way greenlets are currently used would not fix the issue: user sets up a "threadlocal" in their shell or embedding environment, submits a statement to bpython, bpython decides to perform the evaluation in an other thread / greenlet (I'm guessing? or the failure makes no sense). If the statement accessed the threadlocal, the evaluation might blow up because it's not been setup in the other threads / greenlets of bpython's pool (or maybe it never works at all if bpython spawns a new greenlet for each evaluation). |
...given we're likely to keep checking if the dep is still there, as very few things need it still. Bug: bpython/bpython#641 Signed-off-by: Sam James <sam@gentoo.org>
Uh oh!
There was an error while loading. Please reload this page.
The only reason to use greenlets instead of threads was less latency. We should measure how much less, because it's breaking things for people (#640) and is another dependency to install. Here's the commit: 2e54cbb
This could be a large change and shouldn't go in a bugfix release.
The text was updated successfully, but these errors were encountered: