[ https://issues.apache.org/jira/browse/AXIS2C-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608424#action_12608424 ]
Senaka Fernando commented on AXIS2C-1190: ----------------------------------------- Hi Damitha, This is something related to the echo non-blocking sample isn't it? If it is for Axis2/C itself, AFAIK it is not what is intended. Because, 1. There already is a defined on-complete handle 2. The get_complete function will introduce a blocking nature to the non-blocking code paths. I say so because I believe that a non-blocking execution should be based on response events rather than response states. Regards, Senaka > Non blocking samples could be improved by the use of > axis2_callback_get_complete function. > ------------------------------------------------------------------------------------------ > > Key: AXIS2C-1190 > URL: https://issues.apache.org/jira/browse/AXIS2C-1190 > Project: Axis2-C > Issue Type: Bug > Environment: all > Reporter: Damitha Kumarage > Assignee: Damitha Kumarage > > I can see that in non blocking samples it keep variable isComplete which is > updated from within the on_complte callback function to notify the > application client that response has arrived. Meanwhile client is in a while > loop which look for the change in onComplete variable for loop break. > I think it is more advisable simpler to use following in the client code > which use axis2_callback_get_complete function. > while(!axis2_callback_get_comlete(callback, env)) > { > AXIS2_SLLEP(1); > if(count < 30) > { > count++; > } > else > { > printf("\necho client invoke failed. Counter timed out. \n"); > } > } > echo_process_result_node(callback, env); > Note that echo_process_result_node(callback, env) function > has the same content as the echo_callback_on_complete() function. Only the > name > is changed for appropriateness. > Also significant change is not passing a callback function with the callback. > This is not needed. > Once response come back the callback has the response envelope set. Calling > echo_process_result_node > we can process this result appropriatley. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]