Closed jwp closed 10 years ago
I don't think extending stateful is appropriate. Much of the logic therein is quite particular to generators. src/closure.c methinks.
I removed the critical label as ISTM that some more thought might be desirable. It makes sense, but the initial double call required by closure seems suspicious.
I don't see this as being advantageous. Generator works fine and can used to implement a closure approach.
Currently Postgres.Stateful wants a generator.
Sometimes, caching a simple callable makes sense over using a generator in order to leverage closures.
Potentially, this should be implemented using a distinct type. Postgres.Closure?