WIP: compilation-queue BLACS implementation #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Inform runmanager how many shots are remaining in BLACS' queue.
Required for the "delayed compilation" feature in labscript-suite/runmanager#104 to work.
This is a bit of a hack presently, it happens in the queue's thread and so blocks for up to 5 seconds if runmanager is not running.
This would be better done as an extension that the queue pipes events to, and ideally the information should go out to whoever is listening over PUB/SUB rather than a method call to a specific runmanager instance.
It is possible to have multiple runmanager instances sending shots to BLACS, only the one specified in the labconfig file will receive the information, eg
I'll think about how to switch this to PUB/SUB. If designed to work with multiple runmanagers:
When I first wrote this code (this is ~2 years old), I remember thinking that PUB/SUB was going to be a problem, whereby e.g. closing and reopening runmanager or BLACS could result in deadlocks where they're both waiting on each other. But thinking about it now I don't see the problem, so will think more about it and switch this and the corresponding runmanager PR to use PUB/SUB for this if it seems to make sense. In the meantime, this WIP PR can be used to get the feedback feature working.