• Instead of returning references to static memory (which are invalidated by
    subsequent or concurrent calls to the function), require users to input string
    buffers to functions that return strings.
    
    Affected functions:
    br_get_filename
    br_get_metadata_string
    br_scratch_path
    br_objects
    br_most_recent_message
    
    In some GUI functions, use C++ functions instead of going through the c api
    add a c++ method correspondign to br_objects (which returns a stringlist
    instead of merging the lines)
    
    br_read_pipe and br_get_header also use static memory in a similar way, but
    are not addressed in this commit.
    Charles Otto authored
     
    Browse Dir »






  • The primary addition is ProcessWrapperTransform, which takes a transform as a
    child, and creates a worker process that runs that transform. The main point of
    this is to handle cases where we interface with non-threadsafe code, and need
    to isolate transforms in their own processes if we want to use multiple copies
    of them.
    
    Inter-process communication is handled using QLocalServer/QLocalSocket, the
    actual worker processes are additional instance of br, which does mean this
    bleeds out to the public API to an unfortunate extent.
    
    Initial trvial tests seem promising, but generally we can expect performance
    to degrade if larger amounts of data are transfered, ideally we should do
    ProcessWrapper(Open+FeatureExtraction), so the data transfered to the worker
    is an image name, and the data transfered from the worker is a feature vector.
    Charles Otto authored
     
    Browse Dir »