Read Barcodes Asynchronously
We can read barcodes using the BarcodeReader class. The easiest method to use is the BarcodeReader.Read method. IronBarcode also has a ReadAsync method for multithreaded asynchronous programming.
Key Points
-
Synchronous vs Asynchronous Methods
Readmethod is straightforward for use when immediate results are needed and is called on the main thread.ReadAsyncmethod is for asynchronous execution, allowing the program to continue with other tasks while waiting for the barcode reading to complete.
BarcodeReaderOptionsExpectMultipleBarcodes: If set totrue, the reader will look for multiple barcodes in the image.Speed: Sets the reading speed versus accuracy trade-off using theReadingSpeedenum.Multithreaded: Enables multithreaded reading, which is useful for processing large numbers of images quickly.

