File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ typedef void (*long_async_function_cb)(void*, int);
1010static  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,
2424namespace  cpp  {
2525using  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 ;
Original file line number Diff line number Diff 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
4444void  safe_service::response (int  out_param) {
@@ -48,7 +48,7 @@ void safe_service::response(int out_param) {
4848
4949void  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 ;
                         You can’t perform that action at this time. 
           
                  
0 commit comments