#Anonymous Function in Golang with Mutex behaviour

1 messages · Page 1 of 1 (latest)

earnest bronze
#

Hello, I'm currently working on a scheduling system in go. The function is basically scheduling map and reduce task. However, when I tried to abstract it away into an anonymous function, the function doesn't either parameters accordingly or the mutex just doesn't have any effect on the function call at all. I'm looking for any suggestion/pointers on how to abstract away the loop in both map and reduce task. Many thanks!