Implement simple parallel mechanism to call callback only once, fixes #5