interesting, but it does not do the same as parwork.
parwork set's up a fork-join pipeline which processes the work of channels.
Run does limit functions run in parallel.

On Thursday, March 15, 2018 at 2:53:36 PM UTC+2, rog wrote:
>
> You might be interested to look at 
> https://godoc.org/github.com/juju/utils/parallel#Run, a slightly 
> simpler approach to the same issue, and just about as general, I 
> think. 
>
> On 15 March 2018 at 08:19, Sotirios Mantziaris <[email protected] 
> <javascript:>> wrote: 
> > since the lack of generics i am trying to avoid interface{} as much as 
> > possible. 
> > 
> > On Thursday, March 15, 2018 at 1:03:14 AM UTC+2, [email protected] 
> wrote: 
> >> 
> >> Hi Sotirios, 
> >> 
> >> Why not something like this? 
> >> 
> >> // Stops and returns if any error is encountered by a work function, 
> >> otherwise returns nil. 
> >> // Processes work at the pace of runtime.NumCPU() parallelization. 
> >> func Process(callback func(interface{}), work ...func() (interface{}, 
> >> error)) error 
> >> 
> >> Matt 
> >> 
> >> On Wednesday, March 14, 2018 at 3:54:24 PM UTC-5, Sotirios Mantziaris 
> >> wrote: 
> >>> 
> >>> Hi, 
> >>> 
> >>> 
> >>> i have created a package which uses the fork-join model to parallelize 
> >>> work. 
> >>> 
> >>> Check out my blog and the Github repository. 
> >>> 
> >>> 
> >>> Any feedback is highly welcome. 
> >>> 
> >>> 
> >>> Thanks 
> >>> 
> >>> 
> >>> 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to