We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PersonalStorage.ExtractMessage and multi-threaded code


I am extracting messages in a PST using the C# Parallel.For() method and have found that unless I put a lock around the call to ExtractMessage, as shown below, I get lots of exceptions.

MapiMessage mapiMessage;
lock (extractMessageLock)
mapiMessage = pst.ExtractMessage(messageInfo);

So it seems this call is not thread safe. This is OK since I have the above workaround, but I was wondering if you would consider making it thread safe because at the moment I am observing lots of contention/waiting on this lock which is limiting the throughput of the parallel code.


PS - I am using Aspose.Email 1.9.

Hi Phil,

Thank you for using Aspose.Email.

I would like to share with you that Aspose.Email is not thread-safe by default, unless mentioned in documentation. Anyways, I have logged your mentioned issue in our issue tracking system for our development team to look into it further. We will update you here once we have any information in this regard.

This issue has been logged as NETWORKNET-33470 in our issue tracking system.

A post was split to a new topic: PersonalStorage.ExtractMessage and multi-threaded