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

Pushing LNB wave references to threads results in recreation of keys wave #2223

Open
MichaelHuth opened this issue Aug 8, 2024 · 2 comments

Comments

@MichaelHuth
Copy link
Collaborator

Take NWB_AppendSweepDuringDAQ, where we duplicate the LNB waves for pushing them to a thread.

As the keys waves are not duplicated these are recreated on first LNB access in the thread each time.

But even if we duplicate the keys waves as well then the key that should detect changes in the LNB triggers a recreation because WaveModCounterWrapper returns a different value (NaN) for execution in a thread.

One solution would be to duplicate the keys waves as well (if present) and adapt the key to the value as it would be in the thread if the main thread key is valid.

@t-b
Copy link
Collaborator

t-b commented Aug 9, 2024 via email

@MichaelHuth
Copy link
Collaborator Author

Ok, but this is only one example of a more general problem as it also applies to all threadsafe functions that use caching and are used in a preemptive thread.

This is probably low priority.

One approach would be to duplicate the relevant caching waves such that we also push a partial cache to the thread. This would require to save some more info about the original vs. cache wave relation.

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

No branches or pull requests

2 participants