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

[Utility] Cleaned up api for ProcessSet. #942

Closed

Conversation

Steveybrown
Copy link
Contributor

Clients are no longer required to call remove on a process set.

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.

Awesome! Thanks!
Minor comments

thread.join()
// Wait until all processes terminate
for process in self.processes {
try process.waitUntilExit()
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this try? and this method as non throwing

@@ -70,7 +69,7 @@ class ProcessSetTests: XCTestCase {
threadStartCondition.wait()
}
}
processSet.terminate()
try processSet.terminate()

t.join()
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you see time taken by the test testSigInt before and after waitUntilAfter() in process set? There should be a noticeable difference I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't actually notice any major difference. 😕

/// Terminate all the processes. This method blocks until all processes in the set are terminated.
///
/// A process set cannot be used once it has been asked to terminate.
/// Throws: If an error occurs during the wait for a process to terminate.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not true anymore

Clients are no longer required to call remove on a process set.
@aciidgh
Copy link
Contributor

aciidgh commented Feb 10, 2017

@swift-ci please test

@aciidgh
Copy link
Contributor

aciidgh commented Feb 11, 2017

I opened #951 with a small addition to this patch

Thanks!

@aciidgh aciidgh closed this Feb 11, 2017
@Steveybrown Steveybrown deleted the process-set-api-improvements branch February 11, 2017 09:55
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