Reading emails using multiple threads RRS feed

  • Question

  • I have multiple threads reading emails from the Inbox folder. But, multiple threads pick the same email, which I need to avoid.

    Is there some way to put a lock on an email while reading it, or some other way to avoid picking the same email by multiple threads?

    Each thread runs the following code to read the emails - 

    var emails = this.exchange.FindItems(sourceFolderId, query, new ItemView(100));

    • Moved by Manu Meng Wednesday, April 10, 2019 7:25 AM relocate
    Tuesday, April 9, 2019 11:15 AM

All replies