asp.net global synclock object
问题 is there a way in asp.net to make sure that a certain threaded sub is not run twice concurrently, no matter what? the code i have now is Public Class CheckClass ReadOnly Property CheckSessionsLock As Object Get If HttpRuntime.Cache("CheckSessionsLock") Is Nothing Then HttpRuntime.Cache("CheckSessionsLock") = New Object Return HttpRuntime.Cache("CheckSessionsLock") End Get End Property Sub TryThreads() Dim thread = New Thread(AddressOf TryLock) thread.Priority = ThreadPriority.Lowest thread