mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 15:50:01 +00:00
Update Tour.md
This commit is contained in:
parent
36b789e2b6
commit
6fb7ed746f
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ local myFunction()
|
|||
return Promise.new(function(resolve, reject, onCancel)
|
||||
local connection
|
||||
|
||||
someEvent:Connect(function(...)
|
||||
connection = someEvent:Connect(function(...)
|
||||
connection:Disconnect()
|
||||
resolve(...)
|
||||
end)
|
||||
|
@ -179,4 +179,4 @@ If a cancelled Promise has any consumers itself, those Promises are also cancell
|
|||
|
||||
Resolving a Promise with a Promise will cause the resolving Promise to become a consumer of the chained Promise, so if the chained Promise becomes cancelled then the resolving Promise will also become cancelled.
|
||||
|
||||
If you call `resolve` with a Promise within a Promise which is already cancelled, the passed Promise will be cancelled if it has no other consumers as an optimization.
|
||||
If you call `resolve` with a Promise within a Promise which is already cancelled, the passed Promise will be cancelled if it has no other consumers as an optimization.
|
||||
|
|
Loading…
Reference in a new issue