Commit graph

2 commits

Author SHA1 Message Date
Bradley M. Kuhn
8349b9610b
Only server should control fifo; client should wait for it to clear
On the a classic “concurrency is hard” front, I am slightly proud of
myself that I didn't hit this race condition but anticipated that it
might occur later.  Giving entire control to fifoName to the server
makes more sense here, and the client should not submit its query any
time either fifoName or question is set.

As an extra safeguard, the client will die if it gets the lock and
the state for submitting a query isn't right.

Finally, added some fifoName removal debugging on the server.
2020-06-15 16:29:53 -07:00
Bradley M. Kuhn
42800427f6 bean-query daemon: initial version.
This is a very basic daemon to run bean-query so that other Perl programs
can call it.  The speed savings is not really there yet, as to get that, it
would need to leave bean-query running, perhaps timing out and reloading
files as needed.  That's the long term plan.

Right now, all that this is useful for is to run another Perl process that
wants to submit and receive answers to bean-query.
2020-06-15 14:26:31 -07:00