-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Better explain Session.notify #398
Comments
I feel like I raised the same concerns when @lukesneeringer created this and he gave me a really good example of where another project did this. I can't remember it now. I'm happy to accept suggestions for an alias. |
Could it have been threading.Condition.notify from the standard library? It wakes up a thread that is waiting on a condition. I seem to recall being slightly confused when first encountering
Here's another suggestion for the bikeshed then: Would that be more explicit about the fact that Nox will run the session when its turn comes? |
I think |
ping: @lukesneeringer thoughts on renaming |
Simply having an example in the docs would really help. I don't mind the notify name, but was a little hard to gather what it did - an example would go a long way in helping, I think. |
In retrospect, I don't think it's worth troubling people with renaming |
Hey all, I've added a section in the tutorial explaining Cheers 👍🏻 |
As I've been working on #397 I've begun to feel that
Session.notify
is poorly named. Judging by the method's docstring it claims to add the named session to the execution queue. Given this, it would seem thatSession.enqueue
or a more verboseSession.add_to_queue
would be a more descriptive name - anything to better imply that the given session will be run soon (I'm open to suggestions).When I first heard there was a
Session.notify
method (not having read the docstring) a couple questions came to mind:In the original PR, there's not really any justification for the name. The best I can come up with is to say that we are "notifying" the manifest that it should add the session to its queue, but I could only really discern that after having looked at the source to discover exactly what the method did.
The text was updated successfully, but these errors were encountered: