Skip to content

Allow scheduling boost::function#41

Closed
wch wants to merge 1 commit into
masterfrom
boost-function
Closed

Allow scheduling boost::function#41
wch wants to merge 1 commit into
masterfrom
boost-function

Conversation

@wch

@wch wch commented Jan 24, 2018

Copy link
Copy Markdown
Member

This makes it simpler to schedule functions like the ones mentioned here:
rstudio/httpuv#106 (review)

@jcheng5, before merging, we should discuss the object lifetime issues that came up in an earlier conversation. I don't think that they will be a problem here.

I think we avoided adding this in the past because of concerns that it would introduce a boost dependency, but I don't think that this PR is actually adding such a dependency.

@wch

wch commented Jan 24, 2018

Copy link
Copy Markdown
Member Author

In order for code from another package to schedule a boost::function, the later.h file will need a later() implementation that can take a boost::function. This also means that we'll need to add #include <boost/function.hpp>, and that will require packages that use later to have the BH package installed at build time. This is why we didn't implement this earlier.

I think it should be possible to do this by providing something like an abstract class or interface that doesn't require boost, but I don't know for sure.

@jcheng5

jcheng5 commented Aug 26, 2019

Copy link
Copy Markdown
Member

Implemented using a subclass instead

@jcheng5 jcheng5 closed this Aug 26, 2019
@wch wch deleted the boost-function branch September 16, 2019 18:07
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

Successfully merging this pull request may close these issues.

2 participants