Skip to content

Commit 84b500d

Browse files
committed
-.
1 parent a38353c commit 84b500d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

async-call-helper/external_c_lib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ typedef void (*long_async_function_cb)(void*, int);
1010
static void c_long_async_function(void* context,
1111
long_async_function_cb cb,
1212
int in_param,
13-
int sleep_msec = 1000)
13+
int sleep_msec = 1001)
1414
{
1515
std::thread([=] {
1616
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_msec));
@@ -24,7 +24,7 @@ static void c_long_async_function(void* context,
2424
namespace cpp {
2525
using long_async_function_cb_t = std::function<void(int)>;
2626

27-
static void long_async_function(long_async_function_cb_t cb, int in_param, int sleep_msec = 1000) {
27+
static void long_async_function(long_async_function_cb_t cb, int in_param, int sleep_msec = 1001) {
2828
std::thread([=] {
2929
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_msec));
3030
auto out_param = in_param * 2;

async-call-helper/safe-service.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void safe_service::execute_cpp_bind()
3838
{
3939
using namespace std::placeholders;
4040
auto context_bind = get_context<int>(std::bind(&safe_service::response, this, _1));
41-
c_long_async_function(context_bind.context, context_bind.callback, *param * 3);
41+
c_long_async_function(context_bind.context, context_bind.callback, *param);
4242
}
4343

4444
void safe_service::response(int out_param) {
@@ -48,7 +48,7 @@ void safe_service::response(int out_param) {
4848

4949
void safe_service::execute()
5050
{
51-
constexpr const auto cb_type = cb_type_e::c_style;
51+
constexpr const auto cb_type = cb_type_e::cpp_lambda;
5252
switch (cb_type)
5353
{
5454
case cb_type_e::c_style: execute_c_style(); break;

0 commit comments

Comments
 (0)