Skip to content

How can I know a function is called by await? #39439

Answered by targos
ahuangege asked this question in General
Discussion options

You must be logged in to vote

You can't. await only has an effect on the value returned by the function. It's impossible to detect it from within the function.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@ahuangege
Comment options

@aduh95
Comment options

@ahuangege
Comment options

@satvik-1203
Comment options

Answer selected by RedYetiDev
Comment options

You must be logged in to vote
2 replies
@satvik-1203
Comment options

@satvik-1203
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants