What is the difference between Scan, PutToScanQueue, and ScanEx?

Scan and PutToScanQueue are old functions which have been replaced by ScanEx. ScanEx provides more flexibility to programmers.

Scan and ScanEx with the sync flag set are synchronous calls, meaning they will not return until all results have been received from the the underlying scanning engines.

PutToScanQueue and ScanEx without the sync flag set are asynchronous calls, meaning they return immediately and results are returned via callbacks (COM connection points).

Both synchronous and asynchronous scans depend on the thread pool. Anytime you call a scan function, the work is dispatched to a worker thread. That worker thread is then allocated to scan the file/buffer with one engine. If no worker threads are available, the request will wait until one is available.

To learn more about synchronous and asynchronous scans on MetaDefender Core, please refer to the documentation here.

This article pertains to MetaDefender Core v3
This article was last updated on 2017-12-21
CN