mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +00:00
LibCore: Slightly rework the Core::Promise API
The previous iteration of this API was somewhat odd and rough in random places, which degraded usability and made less than perfect sense. This commit reworks the API to be a little closer to more conventional promise APIs (a la javascript promises). Also adds a test to ensure the class even works.
This commit is contained in:
parent
5a0ad6812c
commit
0c5c75e8a4
9 changed files with 150 additions and 38 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class AnonymousBuffer;
|
||||
|
@ -32,7 +34,7 @@ class Object;
|
|||
class ObjectClassRegistration;
|
||||
class ProcessStatisticsReader;
|
||||
class Socket;
|
||||
template<typename Result>
|
||||
template<typename Result, typename TError = AK::Error>
|
||||
class Promise;
|
||||
class SocketAddress;
|
||||
class TCPServer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue