byexamples / byexamples/byexample
Reset interpreter session and reuse the interpreter (isolation level)
- Dominant language
- Python
- Stars
- 67
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
For each file, `byexample` spawns an interpreter to run the examples and it will shutdown after processing the file.
If multiple files have examples of the same language, `byexample` will still spawn and shutdown the interpreter for each file.
This is quite slow.
Some interpreters have the concept of `sessions`: independent execution sessions with a clean environment.
We could use it to reset the session instead of spawning another interpreter which it should be much faster.
This opens several *isolation* levels:
- process: restart each interpreter, always
- session: restart the session if supported, restart the interpreter otherwise
- cleanup: within the same session, perform some actions to clean up it.
- none: do not do anything, it is the user that must code her examples correctly. `byexample` must still do some clean up like resetting the clipboard (isolation == none is *not* a way to concatenate files)
Contributor guide
Assessment
This issue has not been assessed yet.