Send a message to manager using connection `c` and return response
(c, id, methodname, args=(), kwds={})
| 84 | # |
| 85 | |
| 86 | def dispatch(c, id, methodname, args=(), kwds={}): |
| 87 | ''' |
| 88 | Send a message to manager using connection `c` and return response |
| 89 | ''' |
| 90 | c.send((id, methodname, args, kwds)) |
| 91 | kind, result = c.recv() |
| 92 | if kind == '#RETURN': |
| 93 | return result |
| 94 | try: |
| 95 | raise convert_to_error(kind, result) |
| 96 | finally: |
| 97 | del result # break reference cycle |
| 98 | |
| 99 | def convert_to_error(kind, result): |
| 100 | if kind == '#ERROR': |
no test coverage detected
searching dependent graphs…