def _dlib_proc(obj_func, pp, space_params, result_queue, i, space_vals):
    """
    Add/overwrite problem params with params given from dlib,
    then run objective function and put the result in the given queue
    """
    for j, key in enumerate(space_params):
        pp[key] = space_vals[j]
    result = obj_func(**pp, pid=i)
    result_queue.put((i, result))
