The blocking nature of the merchant and customer daemons means that they couldn't be run from the same setup command
The threads didn't close properly when closing down (with Ctrl+C)
The second issue was more complicated than I anticipated because it's not just blocking on the while loop at L89 (which is easier to deal with), but .readline() is also blocking from within it's own subprocess. I think the proper solution to be able to run the merchant and customer daemons concurrently would involve setting up a queue to get outputs from .readline() without blocking.
Since that would take longer to figure out, I'm thinking for now at least to go with this simpler solution that requires setting up separate terminals for the customer and merchant. It might even be better this way since it's easier to read the output from each one?
this addresses #259
just to recap the two issues:
setup
commandThe second issue was more complicated than I anticipated because it's not just blocking on the
while
loop at L89 (which is easier to deal with), but.readline()
is also blocking from within it's own subprocess. I think the proper solution to be able to run the merchant and customer daemons concurrently would involve setting up a queue to get outputs from.readline()
without blocking.Since that would take longer to figure out, I'm thinking for now at least to go with this simpler solution that requires setting up separate terminals for the customer and merchant. It might even be better this way since it's easier to read the output from each one?