RESOLVED FIXED254502
Implement NativePromise / WTFPromise
https://bugs.webkit.org/show_bug.cgi?id=254502
Summary Implement NativePromise / WTFPromise
Jean-Yves Avenard [:jya]
Reported 2023-03-27 00:16:54 PDT
In the media code, we queue a lot of tasks to be run later once a previous task has completed. We currently do this with the use of CompletionHandler but this becomes cumbersome once more than two tasks are still pending. This is particularly visible if we want to fix bug 254079. The alternative is to keep queues of operations to run. Mozilla successfully implemented MozPromise which became thoroughly used in their code. It makes for easy to ready asynchronous code and remove all guesses on which thread a completion task may run. Which should have a similar object. We could then do promise1->then(thread, []() { taskToRun1(); })->then(thread, []() { taskToRun2(); })
Attachments
Radar WebKit Bug Importer
Comment 1 2023-04-03 00:17:14 PDT
Jean-Yves Avenard [:jya]
Comment 2 2023-09-01 06:25:36 PDT
Jean-Yves Avenard [:jya]
Comment 3 2023-09-05 09:44:57 PDT
Renamed as per Youenn's suggestion.
EWS
Comment 4 2023-09-19 06:06:17 PDT
Committed 268120@main (a53ad484a1c9): <https://commits.webkit.org/268120@main> Reviewed commits have been landed. Closing PR #17344 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.