Skip to content

Implement a way to post functions to the main loop #1064

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

Closed
igrr opened this issue Nov 20, 2015 · 4 comments
Closed

Implement a way to post functions to the main loop #1064

igrr opened this issue Nov 20, 2015 · 4 comments

Comments

@igrr
Copy link
Member

igrr commented Nov 20, 2015

This should provide an easy way to trigger blocking code from interrupts and timers without having to pass events through flags.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@mangelajo
Copy link
Contributor

+1!

@igrr igrr modified the milestones: 2.1.0, 2.2.0 Feb 27, 2016
@igrr igrr modified the milestones: 2.2.0, 2.3.0 Apr 18, 2016
igrr added a commit that referenced this issue Jun 8, 2016
* Add mechanism for posting functions to the main loop (#1064)

* Fix indentation, add note that API is not stable
@baruch
Copy link
Contributor

baruch commented Jun 19, 2016

Why not make this a library? as it is it will be a burden to any system since it runs in the main outside of the loop. If someone wants this functionality is it so hard to add a call to a library inside the loop to run this?

@igrr
Copy link
Member Author

igrr commented Jun 20, 2016

Currently the "burden" is one extra function call and one if (ptr !=0) check, plus a few global variables. I wouldn't exactly call that a burden, compared to all other stuff which happens in main.

@baruch
Copy link
Contributor

baruch commented Jun 20, 2016

It also pulls all the code and space needed for the list of function pointers. It's not a big burden but ram is not so plentiful that it can be completely ignored. I'm not going to press this in any way, it's a design philosophy more than anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants