I think it's nice that the PJRTBuffer represents both the promise and the value and it supports the await() interface.
For PJRTArrayPromise this is not possible because we don't control the R array object. However, we could make it an ALTREP so the interface would be standardized (we could also await() the result of as_array_async()). What do you think @dfalbel ? Maybe it's not worth it ...
I think it's nice that the
PJRTBufferrepresents both the promise and the value and it supports theawait()interface.For
PJRTArrayPromisethis is not possible because we don't control the Rarrayobject. However, we could make it an ALTREP so the interface would be standardized (we could alsoawait()the result ofas_array_async()). What do you think @dfalbel ? Maybe it's not worth it ...