I've developed a C# program which I'm using as a child process of a parent process ( which is written in a different programming language than C#, namely: Smallworld Magik ). Standard I/O Channels to the C# program are used to communicate.
The meaning is to communicate with the C# program from the Smallworld Magik process. So, the C# program should receive commands from the Smallworld Magik process, and the Smallworld Magik process should receive the results/updates of the C# program.
The C# program initially receives the arguments by the main method of the program. The C# program writes the results/updates to the Output Channel and the Smallworld Magik process receives and handles them.
No problems till here.
The problem is located in receiving input commands from the Input Channel ( System.Console.In ) by the C# program. I'm using the System.Console.ReadLine() method to get the input command. Calling this method blocks further Program execution.
Does someone have a "non-blocking" solution to this? Since I'm a rooky C# developer, keep it low-level :).