use get_return_value
Revert "use manager.Lock() when possible"

This reverts commit 3d9becd314ee9a793c9ffc52bd722baac300d551.
numprocesses_lock in shared data
Revert "use get_return_value"

This reverts commit 8a30e70d788ab5ac362db98bcbbb6c75f42b9b7b.