IndexError While using the "Chain" Method on a function with @asyn.cancellable
See original GitHub issueNow I have a real issue:
If you use the normal await style from the chain example e.g:
result = await compute(x, y)
on a function with an @asyn.cancellable decorator, it will throw an:
IndexError: tuple index out of range Error.
(File “asyn.py”, line 327, in new_gen)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
When does the async / await chaining stop? - Stack Overflow
Longer answer: Whenever GetDataAsync is awaiting (for instance wait until data is written to a file, or fetched from a database), your procedure ......
Read more >Trio's core functionality — Trio 0.1.0 documentation
Here's the rule: if it's in the trio namespace, and you use await to call it, then it's cancellable (see Yield points above)....
Read more >Promise chaining is dead. Long live async/await
In this article, we will look at how async/await really makes developers' lives easier and why you should stop using promise chaining.
Read more >https://support.microsoft.com/js/SearchBox.Main.mi...
{ indexOf, includes }` methods implementation\nvar createMethod = function ... var index = 0;\n // variable length - can't use forEach\n while (chain.length...
Read more >firefox security update - Oracle Linux Yum Server
Details on how to use ULN or http://public-yum.oracle.com to apply this ... Resolves: bz#1141189 (bug in scsi_block_new_request() function introduced by ...
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

You are using the module incorrectly. There is a required syntax for calling an awaitable function. In the no-args case it is
Or when passing args it is:
[EDIT] This isn’t the first time this has caused confusion. I have updated
PRIMITIVES.mdto include a warning about this.Incidentally my fast_io fork fixes this bug in uasyncio V2. Tasks may be cancelled in the normal way without the need for special syntax. Paul Sokolovsky’s version fixes this bug in a more efficient way but it requires his pycopy firmware; mine uses official firmware.
This is your choice. I only support official MicroPython firmware for a few reasons, not least because binaries are available to those who are reluctant or unable to build from source.