Title: [Bug]: Calling start() multiple times on a macos timer doesn't stop the previous timer · Issue #29076 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Calling start() multiple times on a macos timer doesn't stop the previous timer · Issue #29076 · matplotlib/matplotlib
X Title: [Bug]: Calling start() multiple times on a macos timer doesn't stop the previous timer · Issue #29076 · matplotlib/matplotlib
Description: Bug summary When calling timer.start(); timer.start() on an already running timer, the previous timer should be stopped before starting a new one. On the macosx backend this causes two timers to be running under the hood. Code for reprod...
Open Graph Description: Bug summary When calling timer.start(); timer.start() on an already running timer, the previous timer should be stopped before starting a new one. On the macosx backend this causes two timers to be...
X Description: Bug summary When calling timer.start(); timer.start() on an already running timer, the previous timer should be stopped before starting a new one. On the macosx backend this causes two timers to be...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29076
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Calling start() multiple times on a macos timer doesn't stop the previous timer","articleBody":"### Bug summary\n\nWhen calling `timer.start(); timer.start()` on an already running timer, the previous timer should be stopped before starting a new one. On the macosx backend this causes two timers to be running under the hood.\n\n### Code for reproduction\n\n```Python\nimport time\r\nimport matplotlib.pyplot as plt\r\n\r\ntimer = plt.figure().canvas.new_timer(interval=1000)\r\n\r\ntimer.add_callback(lambda: print(f\"{time.ctime()}\"))\r\ntimer.start()\r\ntimer.start()\r\n\r\nplt.pause(2)\n```\n\n\n### Actual outcome\n\n4 prints, 2 per second\r\n```\r\nTue Nov 5 09:07:27 2024\r\nTue Nov 5 09:07:27 2024\r\nTue Nov 5 09:07:28 2024\r\nTue Nov 5 09:07:28 2024\r\n```\n\n### Expected outcome\n\n2 prints, 1 per second\r\n```\r\nTue Nov 5 09:07:27 2024\r\nTue Nov 5 09:07:28 2024\r\n```\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacos\n\n### Matplotlib Version\n\nmain\n\n### Matplotlib Backend\n\nmacosx\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/greglucas","@type":"Person","name":"greglucas"},"datePublished":"2024-11-05T16:11:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/29076/matplotlib/issues/29076"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:807a1353-38dc-f53c-73bc-ebbfc180e413 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9072:203A5F:273695:35F7E5:6A536E64 |
| html-safe-nonce | a6000e4f709151d46ef0f848cb64b24c297a34fa1f121b6da25cdb892ddb1a57 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDcyOjIwM0E1RjoyNzM2OTU6MzVGN0U1OjZBNTM2RTY0IiwidmlzaXRvcl9pZCI6IjExNzc2MjAzMDg1MzE4MzQ0NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b1e90a034f4e279ade543dffcfe7e5d74d1be585e7313601039a5fd54d8a8117 |
| hovercard-subject-tag | issue:2635891316 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/29076/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7ea72664a49d78bd280305b0721430e23f4fc14466f5b308c47ba4b252c500a/matplotlib/matplotlib/issues/29076 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7ea72664a49d78bd280305b0721430e23f4fc14466f5b308c47ba4b252c500a/matplotlib/matplotlib/issues/29076 |
| og:image:alt | Bug summary When calling timer.start(); timer.start() on an already running timer, the previous timer should be stopped before starting a new one. On the macosx backend this causes two timers to be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | greglucas |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width