Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-30

The driver cannot be cleanly used in a multi-threaded application due to pn_driver_wait

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • proton-0.16.0
    • proton-c
    • None

    Description

      An efficient multi-threaded application based on proton-c will want to have one thread blocked on pn_driver_wait if there's no other work for it to do. Unfortunately, pn_driver_wait does thread-unsafe things with internal driver data structures before and after it blocks on the FD set.

      The alternatives are to quiesce all threads prior to calling pn_driver_wait (which is undesirable for performance reasons) or to divide pn_driver_wait into three sections, the first and third of which can be invoked with a lock held and the second of which (the poll call) can be invoked without a lock.

      Alternatively, a driver API better suited to multi-threading could be developed.

      Attachments

        Issue Links

          Activity

            People

              aconway Alan Conway
              tross Ted Ross
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: