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

Hide natlink timer? #40

Open
dougransom opened this issue Dec 21, 2022 · 4 comments
Open

Hide natlink timer? #40

dougransom opened this issue Dec 21, 2022 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@dougransom
Copy link
Member

so grammars don't call unitentnialllyto replace timer callback

@drmfinlay
Copy link
Member

Do you mean the low-level Natlink function (setTimerCallback)?

@dougransom
Copy link
Member Author

I think so, Quintijn has been working on a multiplexed timer and i think it will get confused if some other code sets the timer callback.

I think Quintijn's timer can replace the natlink timer.

@dougransom dougransom assigned dougransom and quintijn and unassigned dougransom Jan 4, 2023
@dougransom dougransom added the question Further information is requested label Jan 4, 2023
@drmfinlay
Copy link
Member

Okay then. There are a few Natlink functions that can be used to break natlinkcore functionality. SetTimerCallback is one, SetChangeCallback is another. This has been the case for some time. I don't know if it's really worth changing the lower-level API over this. It's up to you, but I would opt for warnings in the documentation instead.

Dragonfly currently uses the setTimerCallback function for its multiplexing timer. Once natlinktimer.py is released, it should be a simple matter to adjust the library to use it instead. I'll leave the old method in as a fallback for older versions of Natlink.

@quintijn
Copy link
Collaborator

quintijn commented Jan 4, 2023

The natlinktimer.py module directly calls setTimerCallback. When another module calls this same function, the natlinktimer multiplexing will be stopped. I will make a test, to make sure it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants