Closed alexvasiu closed 5 years ago
I'm not sure why you would want to serialise a promise and send it across the network. A more common use-case would be to use a promise on the client-side to manage an asynchronous request to the server and resolve the promise with the raw data from the server once you receive it. This way the actual promise object never needs to be sent around.
You can think of promises as wrapping up a piece of data that is requested asynchronously, but in this case I think it's more beneficial to think of the promise representing the action of requesting the data than the data itself.
If I want to transmit a promise from server to client using Object Serialization with BinaryFormatter, it will throw an exception because Promise class don't have attribute
[Serializable]
Error: