Skip to content

Conversation

@gmittert
Copy link
Contributor

@gmittert gmittert commented Apr 9, 2019

No description provided.

///
/// Note: This method can throw if underlying POSIX methods fail.
public func lock() throws {
#if os(Windows)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor note on indenting:

Copy link
Contributor

@aciidgh aciidgh left a comment

Choose a reason for hiding this comment

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

Thanks! Looks great, just left some minor notes on indenting.

@gmittert
Copy link
Contributor Author

Fixed up the indenting

@aciidgh
Copy link
Contributor

aciidgh commented Apr 13, 2019

@swift-ci smoke test

@aciidgh
Copy link
Contributor

aciidgh commented Apr 13, 2019

@swift-ci smoke test linux

public final class FileLock {
/// File descriptor to the lock file.
#if os(Windows)
private var h: HANDLE?
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not at least handle instead of h for this variable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Renaming to handle would be nice to have. Feel free to make a PR :)

Copy link
Contributor

Choose a reason for hiding this comment

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

#if os(Windows)
private var h: HANDLE?
#else
private var fd: CInt?
Copy link
Contributor

Choose a reason for hiding this comment

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

What fd stands for?

Copy link
Contributor

Choose a reason for hiding this comment

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

file descriptor

@aciidgh aciidgh merged commit 9e692e4 into swiftlang:master Apr 13, 2019
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.

3 participants