F
fniles
If I am using a synchronized hashtable, do I still need to use
SyncLock ?
Thank you
Friend g_htCommoditys As Hashtable
Friend g_htSyncCommoditys As Hashtable
Friend CommodityLock As New Object
g_htCommoditys = New Hashtable
g_htSyncCommoditys = Hashtable.Synchronized(g_htCommoditys)
SyncLock CommodityLock ---> Is this SyncLock still needed here ?
If Not (g_htSyncCommoditys.Contains(sSymbol)) Then
Dim sCommodity(COMM_MAX) As String
sCommodity(COMM_SYMBOL) = "A"
sCommodity(COMM_OPEN) = "08:30"
g_htSyncCommoditys.Add(sSymbol, sCommodity)
End If
End SyncLock
SyncLock ?
Thank you
Friend g_htCommoditys As Hashtable
Friend g_htSyncCommoditys As Hashtable
Friend CommodityLock As New Object
g_htCommoditys = New Hashtable
g_htSyncCommoditys = Hashtable.Synchronized(g_htCommoditys)
SyncLock CommodityLock ---> Is this SyncLock still needed here ?
If Not (g_htSyncCommoditys.Contains(sSymbol)) Then
Dim sCommodity(COMM_MAX) As String
sCommodity(COMM_SYMBOL) = "A"
sCommodity(COMM_OPEN) = "08:30"
g_htSyncCommoditys.Add(sSymbol, sCommodity)
End If
End SyncLock