Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: compilation-queue BLACS implementation #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chrisjbillington
Copy link
Member

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

[servers]
runmanager = localhost

I'll think about how to switch this to PUB/SUB. If designed to work with multiple runmanagers:

  • Should BLACS tell each runmanager instance how many of its shots are remaining in the queue? Or how many shots total? Maybe a dict containing all the info, and runmanager instances can decide what to do with it.
  • If the former, shots will need to contain information from what runmanager instance they came from. This can be gleaned either at shot submission time (zmq can give you the IP address of the client that sent the shots), or it could be in the shot file itself.

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.

…ger compilation queue uses it too now.

Inform runmanager how many shots are remaining each iteration of the queue.
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.

It would be better done as an extension that the queue pipes events to.
This was implemented independently in both branches, and in the master
branch is named just `timeout`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant