tinygo/src/internal
Ayke van Laethem 8bf94b9231 internal/task: disallow blocking inside an interrupt
Blocking inside an interrupt is always unsafe and will lead to all kinds
of bad behavior (even if it might appear to work sometimes). So disallow
it, just like allocating heap memory inside an interrupt is not allowed.

I suspect this will usually be caused by channel sends, like this:

    ch <- someValue

The easy workaround is to make it a non-blocking send instead:

    select {
    case ch <- someValue:
    default:
    }

This does mean the application might become a bit more complex to be
able to deal with this case, but the alternative (undefined behavior) is
IMHO much worse.
2023-02-26 22:42:24 +01:00
..
bytealg src/internal/bytealg: fix indexing error in Compare() 2021-09-26 11:07:19 +02:00
fuzz all: run gofmt on all source code 2022-06-19 13:00:44 +02:00
reflectlite all: add support for go 1.13 2019-09-24 16:13:26 +02:00
task internal/task: disallow blocking inside an interrupt 2023-02-26 22:42:24 +01:00