Skip to content

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

Open
thomasballinger opened this issue Oct 10, 2016 · 6 comments
Open

s/greenlets/threads/g #641

thomasballinger opened this issue Oct 10, 2016 · 6 comments

Comments

@thomasballinger
Copy link
Member

thomasballinger commented Oct 10, 2016

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.

@sebastinas
Copy link
Contributor

Do you remember how well threads worked compared to greenlets?

@thomasballinger
Copy link
Member Author

I think it was about twice the latency, but I should measure.
On Tue, Oct 11, 2016 at 5:09 PM Sebastian Ramacher notifications@github.com
wrote:

Do you remember how well threads worked compared to greenlets?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#641 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAcAf-rl7WOyiz8X029nYdTQg3C7qPGwks5qy_slgaJpZM4KSxIH
.

@thomasballinger
Copy link
Member Author

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.

@thomasballinger
Copy link
Member Author

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.

@thomasballinger
Copy link
Member Author

(I've obviously made no progress on this, other implementations welcome!)

@xmo-odoo
Copy link

xmo-odoo commented Aug 8, 2019

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).

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Dec 8, 2023
...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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants