> ' Execute at the end of each hit > Public Function EndRequest() As Boolean > > ' If this is the first hit > If lFirstHit Then > lFirstHit = False > End If >Can't pin it down but that feels a bit risky in that lFirstHit itself is not thread safe. And I'm also not sure whether taking a lock on a property of oApp itself is good. Best practice might be something like this:
If Not oApp.lInitialize Then SyncLock locker 'Check again inside safe section If Not oApp.lInitialize Then 'Do stuff oApp.lInitialize = True End If End SyncLock End If 'Where locker is: Private Shared locker As New [Object]()No guarantees :-}