message: use try-finally for locking
diff: @@ -48,16 +48,26 @@ function get_extra_data(bind_info::BindInfo)
  end
  function _add_global_object(main_function, object)
  + begin
  lock(main_function.global_lock)
  + try
  push!(main_function.global_objects, object)
  + finally
  unlock(main_function.global_lock)
  + end
  + end
  return
  end
  function _remove_global_object(main_function, object)
  + begin
  lock(main_function.global_lock)
  + try
  delete!(main_function.global_objects, object)
  + finally
  unlock(main_function.global_lock)
  + end
  + end
  return
  end
  