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

Compatibility with another library requirement... #110

Open
cyboy22 opened this issue Jun 7, 2023 · 3 comments
Open

Compatibility with another library requirement... #110

cyboy22 opened this issue Jun 7, 2023 · 3 comments

Comments

@cyboy22
Copy link

cyboy22 commented Jun 7, 2023

Hi - I am building an application which uses Redis as the cache and persists data to postgreSQL. The postgreSQL library (ozo) requires a macro definition:

BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT

which causes an exhaustive stream of errors that appear to be connected to your redis library. Could you suggest what might be the problem?- please find the output attached.

allout.txt.gz

@mzimbres
Copy link
Collaborator

mzimbres commented Jun 7, 2023

I can reproduce and will investigate soon. As a workaround, instead of using boost::redis::connection you can use an executor other that the default, for example

using executor_type = net::io_context::executor_type;
using connection = boost::redis::basic_connection<executor_type>;

This might have cascading effect, for example, you might have to redefine awaitable type as net::awaitable<void, executor_type> instead of net::awaitable<void>.

@mzimbres
Copy link
Collaborator

mzimbres commented Jun 7, 2023

By the way, boost has a MySql connector: https://www.boost.org/doc/libs/1_82_0/libs/mysql/doc/html/index.html which might be useful if you would like to avoid OZO.

@cyboy22
Copy link
Author

cyboy22 commented Jun 8, 2023

Really appreciate the time you have taken to look at the problem with try/investigate your suggestions.

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