lundi 4 novembre 2019

Chain of responsibility - handling more than one request

Right, this one might be a bit hard for me to explain since I am new to this.

I was given a task to use Chain of Responsibility to solve one of the problems. I had no problem with understanding it and implementing until I found out I have to make sure that my chain is capable of handling more than one request at once.

The chain essentially should work like that: In the whole chain, there are two or more pieces that are capable of handling the same problem. Handling one problem takes a whole minute. If one of the handlers is busy, the request goes straight to the next one (skips the handler that is busy completely).

So my question is: How do I send multiple requests one after another?

Aucun commentaire:

Enregistrer un commentaire