capnproto / go-capnp

Cap'n Proto library and code generator for Go

Home Page:https://capnproto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReleaseFuncs should be non-blocking

zenhack opened this issue · comments

I discussed this with @lthibault on matrix: It is unintuitive, awkward, and I think even undocumented that the ReleaseFuncs returned by method calls will actually block until the method call returns. Instead, I think they should never block and if a method has not already returned, arrange for the promise to be released when it does return, but don't wait for it.

The trivial implementation of this would be to just fork a goroutine in the body.