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

Add documentation for --mutex #280

Merged
merged 6 commits into from
Dec 1, 2016
Merged

Add documentation for --mutex #280

merged 6 commits into from
Dec 1, 2016

Conversation

grrowl
Copy link
Contributor

@grrowl grrowl commented Nov 20, 2016

Adds a note in cli/index.md describing usage of the --mutex flag in both file and network modes.

Fixes #261

Adds a note in cli/index.md describing usage of the `--mutex` flag
in both file and network modes.

## Concurrency and --mutex

When running multiple instances of yarn as the same user on the same server, you can ensure only one instance runs at any given time (and avoid conflicts) by passing the global flag `--mutex (file|network)`. This will write/read a mutex file `.yarn-single-instance` in the current working directory or open network port 31997. You can specify an alternate or global filename, or an alternate network port by specifying `--mutex file:/tmp/.yarn-mutex` or `--mutex network:31999`.
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be better to break these apart into separate examples of how to use each part of this flag.

@grrowl
Copy link
Contributor Author

grrowl commented Dec 1, 2016

💯 so much better. Almost considered moving the "by default" paragraphs into # comments within the sh code examples, but if you don't mind the extra paragraphs it's definitely clearer as non-monospaced english.

@jamiebuilds
Copy link
Contributor

I prefer not putting text into code because that makes it harder to translate

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