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

nimsuggest: add an option to bind to a free port #10328

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

alaviss
Copy link
Collaborator

@alaviss alaviss commented Jan 16, 2019

This allows editor plugin writers to avoid rapidly launching nimsuggest until they hit a free port.

@@ -275,7 +279,7 @@ proc connectToNextFreePort(server: Socket, host: string): Port =
result = port

type
ThreadParams = tuple[port: Port; address: string]
ThreadParams = tuple[port: Port; address: string; findPort: bool]
Copy link
Member

Choose a reason for hiding this comment

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

If you use a global already there is no point in passing it to the thread explicitly.

@alaviss
Copy link
Collaborator Author

alaviss commented Jan 16, 2019

@Araq done, also simplified the implementation a bit.

@Araq Araq merged commit fc30cf0 into nim-lang:devel Jan 16, 2019
@alaviss alaviss deleted the suggest-autoport branch January 17, 2019 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants