Click here to Skip to main content
15,922,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generaldatabase design question Pin
sangsram27-Dec-04 11:06
sangsram27-Dec-04 11:06 
GeneralRe: database design question Pin
Dave Kreskowiak27-Dec-04 12:41
mveDave Kreskowiak27-Dec-04 12:41 
GeneralAcrobat ActiveX VB programming Pin
evEddyG27-Dec-04 10:19
evEddyG27-Dec-04 10:19 
QuestionHow can i extract number from a Mobile SIM using TAPI using VB.NET Pin
Member 79618627-Dec-04 6:38
Member 79618627-Dec-04 6:38 
AnswerRe: How can i extract number from a Mobile SIM using TAPI using VB.NET Pin
Dave Kreskowiak27-Dec-04 9:22
mveDave Kreskowiak27-Dec-04 9:22 
Generalxgfhj Pin
Anonymous27-Dec-04 6:33
Anonymous27-Dec-04 6:33 
QuestionBest way to synchronize collection? Pin
carlos_rocha27-Dec-04 1:15
carlos_rocha27-Dec-04 1:15 
AnswerRe: Best way to synchronize collection? Pin
Dave Kreskowiak27-Dec-04 5:10
mveDave Kreskowiak27-Dec-04 5:10 
carlos_rocha wrote:
I' m using "synclock Coll.SyncRoot" and then "End synclock" (duh). Is this method rather "strong" for it blocks other threads that also use this?

It's supposed to block other threads. That's the whole point behind synchronized access.

carlos_rocha wrote:
that " Hashtable can safely support one writer and multiple readers concurrently". Won't the write affect enumerations done by the readers?

If you keep reading the doc's, you'll see that enumeration is intrinsically not a thread-safe operation. This is because the collection can be modified while the eneration is taking place, and hence, can corrupt the enumeration process. If your going to enumerate the collection, lock it on SyncRoot first, preventing all other threads from doing anything, including writes, with the collection, though, I think you can figure out the pitfalls of doing this...

If you want a synchronized collection that supports one writer and multiple readers simultaneously, use the .Synchronized() method to return a thread synchronized wrapper around your Hashtable and use this version of your Hashtable for all accesses.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Best way to synchronize collection? Pin
carlos_rocha27-Dec-04 5:52
carlos_rocha27-Dec-04 5:52 
GeneralRe: Best way to synchronize collection? Pin
Dave Kreskowiak27-Dec-04 9:07
mveDave Kreskowiak27-Dec-04 9:07 
GeneralRe: Best way to synchronize collection? Pin
carlos_rocha27-Dec-04 22:04
carlos_rocha27-Dec-04 22:04 
GeneralProblem with Access Pin
Briga26-Dec-04 23:30
Briga26-Dec-04 23:30 
GeneralRe: Problem with Access Pin
Dave Kreskowiak27-Dec-04 4:45
mveDave Kreskowiak27-Dec-04 4:45 
GeneralRe: Problem with Access Pin
Briga28-Dec-04 23:45
Briga28-Dec-04 23:45 
Questionhow to make a Modal Dialog in VB.net Pin
BSRK26-Dec-04 21:40
BSRK26-Dec-04 21:40 
AnswerRe: how to make a Modal Dialog in VB.net Pin
Jay Shankar26-Dec-04 22:20
Jay Shankar26-Dec-04 22:20 
GeneralRe: how to make a Modal Dialog in VB.net Pin
Nasir_Awan27-Dec-04 8:32
Nasir_Awan27-Dec-04 8:32 
GeneralRe: how to make a Modal Dialog in VB.net Pin
Jay Shankar27-Dec-04 13:33
Jay Shankar27-Dec-04 13:33 
Generalcreating rich text format file in vb6.0 Pin
Mohammad Daba'an26-Dec-04 20:24
Mohammad Daba'an26-Dec-04 20:24 
GeneralRe: creating rich text format file in vb6.0 Pin
Jay Shankar27-Dec-04 13:37
Jay Shankar27-Dec-04 13:37 
QuestionHow to load record to listview in vb.net Pin
Mekong River26-Dec-04 16:14
Mekong River26-Dec-04 16:14 
AnswerRe: How to load record to listview in vb.net Pin
Mekong River27-Dec-04 16:18
Mekong River27-Dec-04 16:18 
GeneralRubber-Band Focus Rectangle Pin
OICU81226-Dec-04 13:51
OICU81226-Dec-04 13:51 
GeneralPassing events between forms Pin
plukje26-Dec-04 10:53
plukje26-Dec-04 10:53 
GeneralRe: Passing events between forms Pin
carlos_rocha27-Dec-04 1:06
carlos_rocha27-Dec-04 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.