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
class library: fix possible sync problem in NodeProxy clear #2845
class library: fix possible sync problem in NodeProxy clear #2845
Conversation
`MixedBundle` allows to schedule a function when sending happens. This is what was used to schedule into the future the clearing of the old group. It is much better to just delegate this to the server. Because group objects are registered by NodeProxy with the NodeWatcher, it is also released correctly. ( `NodeWatcher.newFrom(s).nodes`). We need to add a very small offset between the bundle timestamps, so their order is guaranteed on the server.
(ping) |
1 similar comment
(ping) |
I did test this a while ago -- sorry I didn't report back. I'm afraid I don't remember the exact result. I suppose it was successful -- if I had seen a problem, I would have reported it at that time. I just retested found that I'm not getting an error from clearing a NodeProxy -- so I think the fix is good. BTW retesting was a bit harder than it needed to be. Unfortunately this branch is now incompatible with the current yaml-cpp submodule, so:
So what might have been just a couple of minutes -- switch branches, test, switch back -- became "try a couple of ways to stash some files that I'm not sure will be restored later because they are untracked," switch branches, test, switch back, discover that the four files didn't come back, and hope it doesn't make a difference the next time I have to build. |
@jamshark70 yes, I stumble over it all the time: git has no very good way to deal with added submodules. In some other pull request, @bagong showed me a way to switch branches correctly in such a situation, but I can't find it anymore now. |
Yea, failing long time memory is one of the worst problems in command line oriented work (almost as bad as in coding ;) ) I spend most time switching between Google, Stackoverflow and the command line 😄. I think in this case the trick to make it memorizable is to think of a submodules as individual units that can be switched on and off. You address a single submodule by its path. Switch it on with init and switch it off with deinit. And get help with |
(can be merged IMHO) |
If someone can give me some test code, I can test it out. |
|
Ah, i didn't realize until i read through #2818 that this is a Linux issue. I don't see that error message on this branch or master on macOS Sierra. Someone on linux should test too. |
If I understood this correctly, this is a potential issue on other systems as well? |
it's just a little lot hard to reproduce |
@telephon @jamshark70 this fixes the issue for me on linux ( |
var oldGroup = group; | ||
if(this.isPlaying) { | ||
bundle = MixedBundle.new; | ||
if(fadeTime.notNil) { bundle.add([15, group.nodeID, "fadeTime", fadeTime]) }; | ||
if(fadeTime.notNil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@telephon A trailing whitespace! : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
[OT] I'd like to have http://www.cplusplus.com/reference/cmath/nextafter/ so we can just push up the time by a minimal timestep, because OSC doesn't support order apart from time (or bundles) |
Danke @telephon ! |
you're welcome ! |
MixedBundle
allows to schedule a function when sending happens. Thisis what was used to schedule into the future the clearing of the old
group. It is much better to just delegate this to the server. Because
group objects are registered by NodeProxy with the NodeWatcher, it is
also released correctly. (
NodeWatcher.newFrom(s).nodes
).We need to add a very small offset between the bundle timestamps, so their order is guaranteed on the server.