[ https://issues.apache.org/jira/browse/QPID-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730476#action_12730476 ]
Ted Ross commented on QPID-1982: -------------------------------- The interfaces in qpid/cpp/src/qmf are intended to be wrapped with bindings for various languages (Ruby, Python, C++, etc.). The language-specific wrapper (or driver) is responsible for determining what the threading model is for its API. The notifyFd can be abstracted but is has to be usable in a select/poll construct in any language. What is needed is a language-agnostic way of waking up a thread or process when it has work to do. It would be straight forward to replace "int" with a defined type and to replace "::write()" with a macro. I'm not sure, however, how the driver-side can be abstracted. It is not sufficient to have a blocking call that returns when there is work to do because the application may need to simultaneously be watching other sources of events (e.g. with select or poll). > QMF ResilientConnection notifyFd feature portability > ---------------------------------------------------- > > Key: QPID-1982 > URL: https://issues.apache.org/jira/browse/QPID-1982 > Project: Qpid > Issue Type: Improvement > Components: Qpid Managment Framework > Affects Versions: 0.5 > Environment: Windows > Reporter: Steve Huston > > The QMF's C++ qmfcommon ResilientConnection class has a setNotifyFd (int fd) > method. The docs say this can receive a file descriptor that is written on > when certain events take place, supposedly so the other end of the channel > can listen, select, etc. and be notified of some event. > This construct isn't portable, both because of the datatype of the fd (int is > not necessarily a legit handle type everywhere) and because the code assumes > a write() will work. The code can be abstracted out to get rid of the write() > easily enough, but what is the usage for this facility? There are no calls to > setNotifyFd() that I can find outside of the library containing the > implementation. So I can't tell if this is something that can be replaced by > qpid::sys::PollableCondition or not. > What is the use case for this, and how can we make this portable? Different > IPC type? Callback to some private hook? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org