3 ms·
It looks like at this time Spawn doesn't support the closures yet. http://www.gocircuit.org/lang.html#worker-functions http://www.gocircuit.org/lang.html#worke
by jbp 13y ago
It looks like at this time Spawn doesn't support the closures yet.
http://www.gocircuit.org/lang.html#worker-functions http://www.gocircuit.org/lang.html#worker-functions:
"The need for boilerplate will be removed in an upcoming Circuit Compiler"
From https://github.com/tumblr/gocircuit/blob/master/src/circuit/use/circuit/bind.go#L75 https://github.com/tumblr/gocircuit/blob/master/src/circuit/...:
"The worker function fn, whose type must have previously been registered with RegisterFunc"
And it looks like only function type id is communicated to worker:
https://github.com/tumblr/gocircuit/blob/master/src/circuit/sys/lang/func.go#L115 https://github.com/tumblr/gocircuit/blob/master/src/circuit/...