Parallel Computing - communication between threads

0

This is a question that came up when I was trying to solve a problem on a client, the problem turned out to be something else but the doubt continued.

Imagine a situation where there are two programs, prog1 and prog2 , where a dll is used, causing prog1 to fire an event prog2 receives this event and manages it.

Example:

prog1 runs a calling establishment

prog2 runs OnEstabelecimentoDeChamada

Since they are running asynchronously and at this point there is a communication between the two and as an argument of that call, the prog1 passes an object to prog2 . The question is, how does the stack stack run from both programs? What happens if another event is called in prog1 while prog2 is still running OnEstabelecimentoDeChamada ?

I tried to be as clear as possible, I would like to know how the calls are properly in the execution stack

    
asked by anonymous 09.08.2017 / 10:56

1 answer

0

Generally when systems communicate this procedure is done in separate execution sequences, that is, both the process of establishing communication and the actual methods of message exchange are performed on separate threads. This is because in the scenario in which an unavailability of one of the parties occurs, none of the programs would be "stuck" to communication failure.

So this means that a stack of separate execution of the program's primary call stack should be used to maintain communication and availability of the other features on both systems.

    
09.08.2017 / 23:38