Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Documenting the non-blocking features of the Process component #2430

Merged
merged 1 commit into from Apr 4, 2013

Conversation

Projects
None yet
4 participants
Contributor

Sgoettschkes commented Mar 30, 2013

Since 2.1, the Process component has a non-blocking feature. This PR documents the usage.

Q A
Doc fix? no
New docs? yes, symfony/symfony#3681
Applies to 2.1+
Fixed tickets #1185

@wouterj wouterj commented on the diff Mar 30, 2013

components/process.rst
+ $process = new Process('ls -lsa');
+ $process->start();
+
+ while ($process->isRunning()) {
+ // waiting for process to finish
+ }
+
+ echo $process->getOutput();
+
+You can also wait for a process to end if you started it asynchronously and
+are done doing other stuff::
+
+ $process = new Process('ls -lsa');
+ $process->start();
+
+ // do other things
@wouterj

wouterj Mar 30, 2013

Member

// ... do other things

weaverryan added a commit that referenced this pull request Apr 4, 2013

Merge pull request #2430 from Sgoettschkes/issue1185
Documenting the non-blocking features of the Process component

@weaverryan weaverryan merged commit 66b685a into symfony:2.1 Apr 4, 2013

Member

weaverryan commented Apr 4, 2013

Hey Sebastian!

It looks like you have your second merged PR with absolutely no changes. Great work on this!

Thanks!

@Sgoettschkes Sgoettschkes deleted the Sgoettschkes:issue1185 branch Apr 4, 2013

@stof stof commented on the diff Apr 5, 2013

components/process.rst
@@ -26,15 +26,16 @@ a command in a sub-process::
$process = new Process('ls -lsa');
$process->setTimeout(3600);
$process->run();
+
+ // executes after the the command finishes
@stof

stof Apr 5, 2013

Member

duplicate the.
@weaverryan a change was needed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment