|
-
Dec 19th, 2011, 03:47 PM
#1
Thread Starter
Hyperactive Member
what's the correct way to share a hashtable in multiple threads?
I have a program that are multiple thread. Each thread calculate some data independently. however, they will need share a hashtable which controls a hardware resource. because the resource is limited, so, it may need lock the resource for a thread, and then release it when thread is finished. and the resource can not be reused immediately, will have to wait for some time, say 5 or 10 minutes, for the device to reset.
obviously, use a global hashtable, it will work. is there any other suggestions? so, it looks more professional?
thanks
bear
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|