Hacker News new | ask | show | jobs
by TheDong 1129 days ago
> you can't call async code from a sync context (hence the color issue), but I can always pass a "context.Background()" or such as a context value if I don't already have one.

You can always pass context.Background, in this metaphor creating a new tree of color.

You can always call "runtime.block_on(async_handle)", in this metaphor also creating a new tree of color.

1 comments

Go doesn't have async/sync distinction, no keywords so the metaphor doesn't hold.