Skip to content

New cancel mechanism for UDA requests - #149

Open
roddrok wants to merge 1 commit into
mainfrom
148-for-long-latency-requests-a-request-break-is-required
Open

roddrok wants to merge 1 commit into
mainfrom
148-for-long-latency-requests-a-request-break-is-required

Conversation

@roddrok

@roddrok roddrok commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

A first approach has been included. It uses: cancelAPI() call that has to be used in a signal handler or different thread.

Although it is a bit out of scope,thi spart has been very useful for us:
In case of Python clients, I had to force multithreading for SIGINT handling, and only a specific set of python UDA API calls that don't manage internally numpy. For some internal operations, python numpy and multithreading can give problems.

1- In swig interface file:
%feature("nothreadallow");

%feature("nothreadallow", "0") UdaClientReaderBase::fetchData;
%feature("nothreadallow", "0") UdaClientReaderBase::getVariableList;
%feature("nothreadallow", "0") UdaClientReaderBase::getPulses2;

%include "../../c/include/uda/idam/udaStructs.h"
%include .....
....

2- In swig Makefile:

swig -c++ -python -threads ....

@roddrok roddrok linked an issue Nov 3, 2026 that may be closed by this pull request
@stephen-dixon

Copy link
Copy Markdown
Collaborator

like it but give me a few days to check more thoroughly. there might be a race condition here and I want to double check a few things like security implications and exit status semantics. and to think if there's anything to enforce the limitations beyond comments in the code, such as for TLS, non-posix clients, or servers proxied through nginx.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For long latency requests a request break is required

2 participants