I am using SharePoint server object model with C# and having problems creating multi-threaded application using sharepoint server object model.
I have two types of jobs, first job type involve reading data in SharePoint document library and second type involve writing data to document library.
When i process multiple data reading jobs in multiple threads all goes fine. But when i process multiple data writing jobs in multiple threads then application freezes after some time.
I know all instance methods in SharePoint server object model are not thread safe. But multi threading seems to work fine with data reading jobs, it only causes issues when data writing jobs are involved. I have checked the threads and they freeze on object model API calls.
Is there any safe way to implement multi threaded application using sharepoint server object model.