Skip to content

Conversation

@ElvenSpellmaker
Copy link
Owner

  • Adds comments to all class files.
  • Allows Errors to be yielded which will write to the stderr of the system.

 * Allows `Error`s to be yielded which will write to the `stderr` of the system.
Copy link
Owner Author

Choose a reason for hiding this comment

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

This whole class, while useful in testing isn't very well thought out and isn't docblocked fully either. Change?

@ElvenSpellmaker
Copy link
Owner Author

Thinking about this some more tonight has made me realise, it'd be a lot better if commands could each have their own StdErr. Otherwise commands such as yes 2> /dev/null | grep 'y' aren't possible.

This would open a nice refactor which could potentially see the scheduler massively reduced in complexity for an abstract class which all commands extend which would contain most of the logic. Each command would then have its own StdIn, StdOut, and StdErr, with any that haven't been set being tied up by the scheduler at run-time.
Then each command could write directly to their StdIO channels without any care as they'll all be valid at run-time. (Relatively, they'd still need to yield, else you'd break the whole point of this coöperative scheduling.)

@ElvenSpellmaker
Copy link
Owner Author

I finished said rewrite last night, will push later.

ElvenSpellmaker added a commit that referenced this pull request Jan 9, 2016
 * Adds `phpcs` and `phpmd` and a Travis file for checking the outcome.
 * Commands now handle all their own logic leaving less for the Scheduler.
 * Implements StdErr channels (Closes #5).
 * Commands may now have an unlimited number of channels which can be input or
   output channels or both.
 * Bumps the version to PHP 5.6 minimum.
 * Updates the README.
ElvenSpellmaker added a commit that referenced this pull request Jan 9, 2016
 * Adds `phpcs` and `phpmd` and a Travis file for checking the outcome.
 * Commands now handle all their own logic leaving less for the Scheduler.
 * Implements StdErr channels (Closes #5).
 * Commands may now have an unlimited number of channels which can be input or
   output channels or both.
 * Bumps the version to PHP 5.6 minimum.
 * Updates the README.
ElvenSpellmaker added a commit that referenced this pull request Jan 9, 2016
 * Adds `phpcs` and `phpmd` and a Travis file for checking the outcome.
 * Commands now handle all their own logic leaving less for the Scheduler.
 * Implements StdErr channels (Closes #5).
 * Commands may now have an unlimited number of channels which can be input or
   output channels or both.
 * Bumps the version to PHP 5.6 minimum.
 * Updates the README.
@ElvenSpellmaker ElvenSpellmaker deleted the feature/stderr branch January 9, 2016 16:58
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