Simultatious getting, but protected setting?
I'm wondering if it is possible to have a list that is accessed by multiple threads to allow these threads to get the data simultanious, but only one thread may edit the list.

When editing the list, all getting and other setting threads are blocked until done.
Setting threads need to have priority otherwise it may never return due to all the get requests. (or it would require some sort of scheduler)

I don't think regular critical sections allow for this.
Thanks given by:
There's a synchronization object called read-write lock exactly for that purpose, but on most systems it's implemented using critical sections and events internally, so there's really not much benefit other than prioritization.

I've read about lockless lists, too, not requiring any synchronization at all, but they are notoriously known to be slow.
Thanks given by:

Users browsing this thread: 1 Guest(s)