runtime: use func value for parfor body
Yet another leftover from C: parfor took a func value for the callback, casted it to an unsafe.Pointer for storage, and then casted it back to a func value to call it. This is unnecessary, so just store the body as a func value. Beyond general cleanup, this also eliminates the last use of unsafe in parfor. Change-Id: Ia904af7c6c443ba75e2699835aee8e9a39b26dd8 Reviewed-on: https://go-review.googlesource.com/3396Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Showing
Please
register
or
sign in
to comment