Fix RPCTimerInterface ordering issue #7317

pull jonasschnelli wants to merge 2 commits into bitcoin:master from bitcoin:2016/01/qt_thread changing 4 files +25 −17
  1. jonasschnelli commented at 9:15 AM on January 8, 2016: contributor

    Dispatching a QThread from a non Qt thread is not allowed. Always use the HTTPRPCTimerInterface (non QT) to dispatch RPCRunLater threads.

    Agree that using the order of timerInterfaces is not the best way of identifying the type of the timer interface.

    fixes #7316

  2. jonasschnelli added the label GUI on Jan 8, 2016
  3. MarcoFalke commented at 9:36 AM on January 8, 2016: member

    Tested ACK 9490ec3, indeed fixes #7316 (comment).

    Tag "Backport" missing?

  4. jonasschnelli commented at 9:37 AM on January 8, 2016: contributor

    Discussed with @laanwj on IRC and i'll try now to remove the set of timers, I think having only one timer makes things more stable for future changes.

  5. laanwj commented at 9:38 AM on January 8, 2016: member

    Concept ACK, but the change in logic needs to be more explicit. This is too fragile against refactors/reorders (at least for master, for 0.12 as a quick last minute patch it'd be acceptable...). (as discussed on IRC)

  6. jonasschnelli commented at 10:07 AM on January 8, 2016: contributor

    Added a commit that removes the std::vector for RPCTimerInterfaces (just one pointer now). Also added a function (RPCSetTimerInterfaceIfUnset) that prevents setting a Qt bases timer interface if already only is set. Not meant for back porting (will open "the" simple fix for 0.12).

  7. in src/rpcserver.h:None in 02ee05fc62 outdated
     104 | -void RPCRegisterTimerInterface(RPCTimerInterface *iface);
     105 | -/** Unregister factory function for timers */
     106 | -void RPCUnregisterTimerInterface(RPCTimerInterface *iface);
     107 | +/** Set the factory function for timers */
     108 | +void RPCSetTimerInterface(RPCTimerInterface *iface);
     109 | +/** Set the factory function for timer, but only, it unset */
    


    laanwj commented at 10:07 AM on January 8, 2016:

    typo: if unset


    jonasschnelli commented at 10:17 AM on January 8, 2016:

    Thanks. Fixed.

  8. laanwj commented at 10:08 AM on January 8, 2016: member

    Nice, uTACK

  9. Fix RPCTimerInterface ordering issue
    Dispatching a QThread from a non Qt thread is not allowed. Always use the HTTPRPCTimerInterface (non QT) to dispatch RPCRunLater threads.
    db198d51a6
  10. jonasschnelli force-pushed on Jan 8, 2016
  11. jonasschnelli force-pushed on Jan 8, 2016
  12. [RPC] remove the option of having multiple timer interfaces 8a7f0001be
  13. in src/qt/rpcconsole.cpp:None in 42bb9fed76 outdated
     277 | @@ -278,7 +278,9 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
     278 |  #endif
     279 |      // Register RPC timer interface
     280 |      rpcTimerInterface = new QtRPCTimerInterface();
     281 | -    RPCRegisterTimerInterface(rpcTimerInterface);
     282 | +    // avoid accidentailly overwrite an existing, non QTThread
    


    laanwj commented at 10:17 AM on January 8, 2016:

    s/accidentiailly overwrite/accidentally overwriting


    jonasschnelli commented at 10:18 AM on January 8, 2016:

    Thanks. Force push fixed.

  14. jonasschnelli force-pushed on Jan 8, 2016
  15. laanwj merged this on Jan 8, 2016
  16. laanwj closed this on Jan 8, 2016

  17. laanwj referenced this in commit 3b57e9cff0 on Jan 8, 2016
  18. jonasschnelli deleted the branch on Jan 21, 2016
  19. cddjr referenced this in commit 8f6dd62912 on Apr 5, 2017
  20. cddjr referenced this in commit 2f3302318f on Apr 6, 2017
  21. codablock referenced this in commit 02f24db379 on Sep 16, 2017
  22. codablock referenced this in commit f2f634186c on Sep 19, 2017
  23. codablock referenced this in commit bcd96b968a on Dec 9, 2017
  24. codablock referenced this in commit 5ca9b1a9c3 on Dec 9, 2017
  25. random-zebra referenced this in commit 1a9f864900 on Oct 3, 2018
  26. random-zebra referenced this in commit cdba3f2af5 on Oct 3, 2018
  27. random-zebra referenced this in commit 00538764e1 on Oct 3, 2018
  28. Mrs-X referenced this in commit f84ec3df8b on Oct 14, 2018
  29. binarysculptor referenced this in commit b63d4d78b6 on Oct 14, 2018
  30. binarysculptor referenced this in commit ec037b901a on Nov 22, 2018
  31. binarysculptor referenced this in commit 34411d9aa4 on Nov 24, 2018
  32. binarysculptor referenced this in commit 93b268ad83 on Nov 24, 2018
  33. observerdev referenced this in commit 7b13385be9 on Dec 6, 2018
  34. observerdev referenced this in commit ba2a28813e on Dec 6, 2018
  35. random-zebra referenced this in commit 5fd67d37cb on Dec 19, 2018
  36. binarysculptor referenced this in commit 0184418761 on Dec 30, 2018
  37. binarysculptor referenced this in commit 0bb683f248 on Dec 31, 2018
  38. binarysculptor referenced this in commit 10ed431529 on Dec 31, 2018
  39. WagerrTor referenced this in commit 7daa7e7d45 on Jan 15, 2019
  40. Stamek referenced this in commit 0816ea5ba8 on May 24, 2019
  41. KabberryDev referenced this in commit 776672682c on Aug 25, 2019
  42. Maciej007 referenced this in commit 361823c2b4 on Aug 30, 2019
  43. KabberryDev referenced this in commit 9a6886e7a7 on Dec 14, 2019
  44. Rebel36 referenced this in commit 2adf62fc07 on Dec 27, 2019
  45. Stamek referenced this in commit 14fe269379 on Mar 15, 2020
  46. wqking referenced this in commit ce3fb239f5 on Apr 1, 2020
  47. 2a5A1Ghu1 referenced this in commit c40ceb2125 on Apr 8, 2020
  48. 2a5A1Ghu1 referenced this in commit 3aebc9630a on Apr 8, 2020
  49. 2a5A1Ghu1 referenced this in commit 9f38b59659 on Apr 20, 2020
  50. ComputerCraftr referenced this in commit 2d3fbb611d on Jul 1, 2020
  51. KolbyML referenced this in commit 0458f1f821 on Aug 2, 2020
  52. KolbyML referenced this in commit fbb8a2cd77 on Nov 21, 2020
  53. tohsnoom referenced this in commit f08daa3301 on May 24, 2021
  54. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me