Skip to content

Conversation

@jonathanslenders
Copy link
Member

  • Fix race condition in ThreadedHistory. Fixes issue Assert fail in document.py when typing while large history loading #1158.
  • Refactored the history code so that asynchronous history loader
    implementations become possible.
  • Start loading the history when the BufferControl renders for the first
    time. This way we are sure that the history loading uses the same event loop
    as the one used by the application.
  • Added unit tests.
  • Make it possible to wrap InMemoryHistory in ThreadedHistory (not useful,
    but good if all combinations work).
@jonathanslenders jonathanslenders force-pushed the history-refactoring branch 6 times, most recently from 110c51b to 1c066d9 Compare January 20, 2021 15:44
- Fix race condition in ThreadedHistory. Fixes issue #1158. - Refactored the history code so that asynchronous history loader implementations become possible. - Start loading the history when the `BufferControl` renders for the first time. This way we are sure that the history loading uses the same event loop as the one used by the application. (Important for tools like ptpython where the `Application` can run in a different thread.) - Added unit tests. - Make it possible to wrap `InMemoryHistory` in `ThreadedHistory` (not that useful, but good if all combinations work). - Use a deque for the working lines in buffer.py -> much better performance when reloading the history. Special thanks to "Bob Hyman <bob.hyman@gmail.com>" for the original implementations of an improved history and script for reproducing issue #1158.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants