Add ability to block call button until call has finished
See original GitHub issueIt’s currently possible to press the call button several times in a row, which will launch multiple runs one after the other - see my toy example below. For computationally intensive tasks it would be nice to be able to ‘block’ any more pressing of the call button if the main function is currently being run.
from magicgui import magicgui
import time
@magicgui(call_button="Run")
def run_timer():
    print('Asleep')
    time.sleep(2)
    print('Awake')
run_timer.show()
Issue Analytics
- State:
 - Created 2 years ago
 - Reactions:2
 - Comments:6 (6 by maintainers)
 
Top Results From Across the Web
Power button ends call - Android Accessibility Help
Open your device's Settings app . Tap Accessibility. Turn on Power button ends call.
Read more >How to disable button until an async function call is over?
I want to disable the refresh button until the async method (and the REST call inside of it) is finished. How can this...
Read more >How to end a call using the power button Samsung Galaxy s9 ...
A tutorial video demonstrates how to end a phone call by pressing the power button. Demonstrating on a Samsung Galaxy s9/so plus.
Read more >Article - Block Spam Callers - TeamDynamix
Block Spam Callers · 1. Press the Cog button (looks like a little gear) on your Cisco phone. · 2. Select "Recents" from...
Read more >If you can't make or receive calls on your iPhone - Apple Support
Check for any blocked phone numbers. Go to Settings > Phone > Blocked Contacts. See if Call Forwarding is turned on. Go to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

since this issue has already been solved for synchronous code, and an async solution is out of scope for the near-term (and there is a workaround), I’m going to close this. but feel free to open if new issues arise
Sorry no, I meant you can use the same call button (we should make it public), but set it to disabled, and then connect to the threadworker finished signal to trigger a callback that re-enables the button.
Let me try to create an example later today.