KeyView 23.2

# Multithreaded Filtering

To ensure multithreaded filter processes are thread-safe, you must create a unique Filter context for every thread by instantiating a `Filter` object. In addition, threads must not share context objects, and the same context object must be used for all API calls in the same thread. Creating a context object for every thread does not affect performance because the context object uses minimal resources.

For example, your code should have the following logic in a thread:

    Filter objFilter = new Filter("YOUR_KEYVIEW_LICENSE");
    objFilter.FilterDirectory = m_filterDirectory;
    objFilter.SetInputSource(infile);
    objFilter.GetDocFormatInfo();

    if (objFilter.CanFilter() == true)

    objFilter.FilterTo(outfile);

    objFilter.ShutdownFilter();

Copyright 2016-2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.2

Topic Title: Multithreaded Filtering