ProcessReader (helper)

About Monkey 2 Forums Monkey 2 Programming Help ProcessReader (helper)

Tagged: , , ,

This topic contains 0 replies, has 1 voice, and was last updated by  nerobot 1 year, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8103

    nerobot
    Participant

    ProcessReader class

    This class provide reading of process output via sync and async variants.

    There are pooling-like system to reduce instances creation based on methods Obtain and Recycle.

    Also you can stop all processes by simple call to static method ProcessReader.StopAll().

    Sync variant should be called inside of fiber:

    Async variant should use events to get data: Finished, PortionRead, Error (new fiber is created inside of RunAsync):

    ProcessReader.Recycle() looks not good, maybe will be better to auto-recycle reader when it finished.

    Full sources:

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.