jeudi 10 avril 2014

asynchrone - évitant la récursivité en lecture/écriture de façon synchrone un port ? -Débordement de pile


All port operations in Rebol 3 are asynchronous. The only way I can find to do synchronous communication is calling wait.


But the problem with calling wait in this case is that it will check events for all open ports (even if they are not in the port block passed to wait). Then they call their responding event handlers, but a read/write could be done in one of those event handlers. That could result in recursive calls to "wait".


How do I get around this?



All port operations in Rebol 3 are asynchronous. The only way I can find to do synchronous communication is calling wait.


But the problem with calling wait in this case is that it will check events for all open ports (even if they are not in the port block passed to wait). Then they call their responding event handlers, but a read/write could be done in one of those event handlers. That could result in recursive calls to "wait".


How do I get around this?


0 commentaires:

Enregistrer un commentaire