Skip to content
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

Default to 1 interactive thread #57087

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Jan 17, 2025

Part of #43672

So:

  • default == 1 default, 1 interactive
  • -t1 == 1 default, 1 interactive
  • -t1,0 == 1 default, 0 interactive
    etc.

Motivations

  • Moves the IO loop off the main thread
  • Makes the default case allow the REPL to do threaded things in the background i.e. completion hints that could be cancelled on next keystroke

@IanButterworth IanButterworth added the multithreading Base.Threads and related functionality label Jan 17, 2025
Comment on lines +622 to +623
// By default, main threads = -1 (== "auto"), interactive = 1
long nthreads = -1, nthreadsi = 1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// By default, main threads = -1 (== "auto"), interactive = 1
long nthreads = -1, nthreadsi = 1;
// By default:
// default threads = -1 (== "auto")
long nthreads = -1;
// interactive threads = 1, or 0 if generating output
long nthreadsi jl_generating_output() ? 0 : 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant