3 ms·
Go's model breaks down as soon as you have to invoke into non-Go code, because the latter has no idea about goroutines. This is a general problem with all "gre
by int_19h 9y ago
Go's model breaks down as soon as you have to invoke into non-Go code, because the latter has no idea about goroutines.
This is a general problem with all "green thread" abstractions - they are not OS level, or if they are (as e.g. fibers are on Win32), nobody cares to use them.
Promises, on the other hand, can be mapped to a straightforward callback-oriented C API, thus allowing a fully async execution stack end-to-end across different languages. You can even go one step further and define a uniform API for all such callbacks, as WinRT did.