Skip to content

thread_pool::fetch_task_or_stop causes the program to pause #73

Description

@Eggache666

code:

try
{
	cpp_redis::client client;
	client.connect(ip, 6379, [&](const std::string& host, std::size_t port, cpp_redis::connect_state status) {});
	client.sync_commit();
	client.hgetall(key, [](const cpp_redis::reply& reply){
		throw std::runtime_error("what happend!");
	});
	client.sync_commit();
}
catch(const std::exception& e)
{
	std::cerr << e.what() << '\n';
}

when I throw an exception in the labmda expression of hgetall, it goes to line 70 (in the file thread_pool.cpp).
Continue debugging, programm will pause when excute to line 124 (in the file thread_pool.cpp).

So, how can i get the exception out of the lambda expression?

platform: Windows10, VS2019-16.7.5

Thank you!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions