()
| 52 | |
| 53 | |
| 54 | def readTaskIds(): |
| 55 | if pending_taskids: |
| 56 | return pending_taskids.popleft() |
| 57 | else: |
| 58 | msg = readMsg() |
| 59 | while type(msg) is not list: |
| 60 | pending_commands.append(msg) |
| 61 | msg = readMsg() |
| 62 | return msg |
| 63 | |
| 64 | |
| 65 | #queue up taskids we read while trying to read commands/tuples |