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. jonasschnelli cross-referenced this on Jan 8, 2016 from issue [Backport 0.12][RPC] quickfix for RPC timer interface problem by jonasschnelli
  10. 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
  11. jonasschnelli force-pushed on Jan 8, 2016
  12. jonasschnelli force-pushed on Jan 8, 2016
  13. [RPC] remove the option of having multiple timer interfaces 8a7f0001be
  14. 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.

  15. jonasschnelli force-pushed on Jan 8, 2016
  16. jonasschnelli cross-referenced this on Jan 8, 2016 from issue walletpassphrase timeout doesn't work in bitcoin-qt by dooglus
  17. laanwj merged this on Jan 8, 2016
  18. laanwj closed this on Jan 8, 2016

  19. laanwj referenced this in commit 3b57e9cff0 on Jan 8, 2016
  20. jonasschnelli deleted the branch on Jan 21, 2016
  21. kyuupichan cross-referenced this on Mar 12, 2017 from issue [backport] Qt Debug Window / Rpc Console improvements by kyuupichan
  22. cddjr referenced this in commit 8f6dd62912 on Apr 5, 2017
  23. cddjr referenced this in commit 2f3302318f on Apr 6, 2017
  24. codablock referenced this in commit 02f24db379 on Sep 16, 2017
  25. codablock referenced this in commit f2f634186c on Sep 19, 2017
  26. codablock referenced this in commit bcd96b968a on Dec 9, 2017
  27. codablock referenced this in commit 5ca9b1a9c3 on Dec 9, 2017
  28. dagurval cross-referenced this on Feb 12, 2018 from issue Fix RPCTimerInterface ordering issue by dagurval
  29. random-zebra referenced this in commit 1a9f864900 on Oct 3, 2018
  30. random-zebra referenced this in commit cdba3f2af5 on Oct 3, 2018
  31. random-zebra referenced this in commit 00538764e1 on Oct 3, 2018
  32. Mrs-X referenced this in commit f84ec3df8b on Oct 14, 2018
  33. binarysculptor referenced this in commit b63d4d78b6 on Oct 14, 2018
  34. binarysculptor referenced this in commit ec037b901a on Nov 22, 2018
  35. binarysculptor referenced this in commit 34411d9aa4 on Nov 24, 2018
  36. binarysculptor referenced this in commit 93b268ad83 on Nov 24, 2018
  37. observerdev referenced this in commit 7b13385be9 on Dec 6, 2018
  38. observerdev referenced this in commit ba2a28813e on Dec 6, 2018
  39. random-zebra referenced this in commit 5fd67d37cb on Dec 19, 2018
  40. binarysculptor referenced this in commit 0184418761 on Dec 30, 2018
  41. binarysculptor referenced this in commit 0bb683f248 on Dec 31, 2018
  42. binarysculptor referenced this in commit 10ed431529 on Dec 31, 2018
  43. WagerrTor referenced this in commit 7daa7e7d45 on Jan 15, 2019
  44. Stamek referenced this in commit 0816ea5ba8 on May 24, 2019
  45. KabberryDev referenced this in commit 776672682c on Aug 25, 2019
  46. Maciej007 referenced this in commit 361823c2b4 on Aug 30, 2019
  47. KabberryDev referenced this in commit 9a6886e7a7 on Dec 14, 2019
  48. Rebel36 referenced this in commit 2adf62fc07 on Dec 27, 2019
  49. Stamek referenced this in commit 14fe269379 on Mar 15, 2020
  50. wqking referenced this in commit ce3fb239f5 on Apr 1, 2020
  51. 2a5A1Ghu1 referenced this in commit c40ceb2125 on Apr 8, 2020
  52. 2a5A1Ghu1 referenced this in commit 3aebc9630a on Apr 8, 2020
  53. 2a5A1Ghu1 referenced this in commit 9f38b59659 on Apr 20, 2020
  54. ComputerCraftr referenced this in commit 2d3fbb611d on Jul 1, 2020
  55. KolbyML referenced this in commit 0458f1f821 on Aug 2, 2020
  56. KolbyML referenced this in commit fbb8a2cd77 on Nov 21, 2020
  57. tohsnoom referenced this in commit f08daa3301 on May 24, 2021
  58. bitcoin 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-05-20 06:55 UTC