]> Cypherpunks repositories - gostls13.git/commit
runtime: use func value for parfor body
authorAustin Clements <austin@google.com>
Wed, 28 Jan 2015 20:55:23 +0000 (15:55 -0500)
committerAustin Clements <austin@google.com>
Thu, 29 Jan 2015 17:38:32 +0000 (17:38 +0000)
commit428afae027548e079335d25cacb70082a0ef8d9f
treea37f4aafb74406d8c76faaa301a5be1e7a338818
parentebbdf2a14cfb2c694d7ecc815d0adc36c344362a
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/3396
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/runtime/export_test.go
src/runtime/parfor.go