Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Simplify threading model in REPL proxy #74

Merged
merged 17 commits into from
Oct 13, 2020

Conversation

0x2c7
Copy link
Owner

@0x2c7 0x2c7 commented Oct 13, 2020

Recently, the dance between REPL threads is kinda complicated than it needs. There used to be 4 threads involve: 1 thread for Pry REPL loop, 1 thread for flushing output from REPL, 1 thread for listening to keyboard, and the stopping thread to sleep, and control states. It's a flawed solution, as the input in REPL loop is evaluated in another thread other from the stopping thread. It leads to many unexpected behaviors, like errors when accessing thread-local variables. It's time to standardize, and evaluation to the stopping thread instead.

Screenshot from 2020-10-13 14-56-35

Fix #73

@0x2c7 0x2c7 force-pushed the bug/access-local-thread-variables branch from c022135 to 9af19b4 Compare October 13, 2020 16:51
@0x2c7 0x2c7 force-pushed the bug/access-local-thread-variables branch from 9af19b4 to 52e9828 Compare October 13, 2020 16:56
@0x2c7 0x2c7 merged commit c5c9064 into master Oct 13, 2020
@0x2c7 0x2c7 deleted the bug/access-local-thread-variables branch October 13, 2020 17:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Not compatible with Rails CurrentAttributes - attributes come back as nil
1 participant