Common Asked Questions
What is multithreading barcode reading in C#?
Multithreading is a core feature in operating systems that support a program (process) to do several jobs (threads) independently.
Using multithread barcode scanning will signifiantly improve the barcode reading speed in multiple CPU core processors computer.
How to enable multi-thread barcode reading in C#?
You can easily configure and enable multithreading barcode scanning through scan option
ScanOptions object.
Set method SetMaxMultiThreadCount() with the maximum number of threads in barcode scanning. The number of
barcode scanning threads should no more than the number of CPU core processors in the running workstation or web server.
What is asynchronous barcode scanning in C#?
Asynchronous programming in C# allows you to scan barcodes which performs tasks without blocking the main thread. It will improve the barcode scanning
performance also.
How to enable asynchronous barcode scanning in C#?
Using OnBarcode C# Barcode Reader library, you can call method
BarcodeScanner.ScanAsync() to scan barcodes asynchronously in
C# ASP.NET, MVC web and WinForms, WPF desktop applications.
What is the difference between multi-thread and async barcode reading in C#?
Multi-threading will help concurrent execution of multiple barcode scanning tasks by using
mutliple threads. And Async processing will release the current barcode reading thread (or main thread) during idle time.
Async processing is based on the task scheduling module, and uses the Async/Await keywords to release the main barcode reading thread.
For example,
await BarcodeScanner.ScanAsync() to apply async processing on barcode reading in C# application.
Can I enable both multithreading and asynchronous barcode reading in C#?
Yes. OnBarcode C# Barcode Reader library supports enable both multithreading and asynchronous barcode reading in C# program.
You can configure and apply multithreading barcode reading in method SetMaxMultiThreadCount() in barcode scanner option, and
call method BarcodeScanner.ScanAsync() to enable asynchronous barcode reading in C# application.
The combination will help barcode scanning performance on multiple CPU core processors.
