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

[CP #1760 > support/v5.12] [python] Call_method in service now allows threads. #1761

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

eclipse-ecal-bot
Copy link
Contributor

Cherry-pick

Cherry-picked PR #1760 to branch support/v5.12.
The cherry-pick was successful.

Please review the changes and rebase-merge if desired.

)

If service and client are located in the same process, the previous implementation of `call_method` caused deadlocks due to the GIL.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -1087,7 +1087,9 @@ PyObject* client_call_method(PyObject* /*self*/, PyObject* args) // (client_ha
PyArg_ParseTuple(args, "nsy#i", &client_handle, &method_name, &request, &request_len, &timeout);

bool called_method{ false };
called_method = client_call_method(client_handle, method_name, request, (int)request_len, timeout);
Py_BEGIN_ALLOW_THREADS
called_method = client_call_method(client_handle, method_name, request, (int)request_len, timeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'called_method' is not initialized [cppcoreguidelines-init-variables]

Suggested change
called_method = client_call_method(client_handle, method_name, request, (int)request_len, timeout);
called_method = 0 = client_call_method(client_handle, method_name, request, (int)request_len, timeout);

@KerstinKeller KerstinKeller merged commit b3e63fc into support/v5.12 Oct 4, 2024
16 of 17 checks passed
@KerstinKeller KerstinKeller deleted the cherry-pick/974964f/support/v5.12 branch October 9, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants