Synchronize calls to TaskContext#addOnCompleteCallback() in ScriptOperator.