-
Notifications
You must be signed in to change notification settings - Fork 762
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
Task-play fails when using AppClock #5700
Comments
This seems to fix it, but I don't know if there are better solutions?
|
@jamshark70 @telephon, opinions? |
I think it's absolutely wrong if there's a clock class that doesn't understand schedAbs -- a bit startled to see that AppClock doesn't have this. I agree with the proposed fix. |
One thing to note in the documentation is that AppClock scheduling is inexact:
This may be one reason why JMc didn't add schedAbs to AppClock -- if user expectation is that the function should awake at exactly the absolute scheduling time, AppClock can't satisfy this. But, I think it would be sufficient to make a note of this in the documentation. (Sooner or later, someone will complain "but I scheduled my thing for exactly beat 101 and it woke up at 101.00037472"...) Also, are there any comprehensive unit tests for Routine and the different types of PauseStream vs all possible clock types? This is exactly the sort of thing that unit testing should have caught, but didn't. EDIT: Also, AppClock |
Hi @jamshark70, would these test methods suffice ?
|
Pretty good. Maybe EventStreamPlayer tests would be useful too, perhaps under TestPattern? (Though maybe I'm just being over-cautious, perhaps drop that idea.) An alternate form might be:
If the test is successful, it isn't necessary to wait for the full timeout period. LinkClock is actually an instance-based clock, like TempoClock -- so
|
|
This, in *schedAbs { arg time, item;
scheduler.schedAbs(time, item);
this.prSchedNotify;
} |
Environment
Steps to reproduce
Expected vs. actual behavior
Tasks should be fully playable with AppClock.
#5626 introduced clock.schedAbs in PauseStream:play,
which assumes that any clock understands schedAbs.
So maybe we need to add an AppClock:schedAbs method?
The text was updated successfully, but these errors were encountered: