Hi SO,
I've written a SharePoint 2010 app that uses a TimerJob to trigger processing of some documents in a list. The timer is set to trigger every minute but the the processing may take more than a minute. I'm just wondering if the next trigger of the timer job will be started using a new thread, or will the timer service just wait until the first thread has completed. I.e. I have no idea how Sharepoint manages threads for TimerJobs and I can't really find any relevant information.
This is possibly a problema given that my TimerJob definition has the following:
public override void Execute(Guid contentDbId)
{
try
{
SPWebApplication webApplication = this.Parent as SPWebApplication;
SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
using (SPSite site = contentDb.Sites[0])
{
using (SPWeb web = site.RootWeb)
{
PRManager.TriggerProcessing(web); // ?
}
}
}
catch (Exception)
{
}
}
}
The PRManager.TriggerProcessing() is a static method, obviously, and while it does contain mechanisms to limit only one thread at a time entering the method body, I'm just wondering IF SharePoint does create multiple threads in the event that those at-minute-interval calls to execute overlap.
Thanks in advance.