mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
428 stars 140 forks source link

[GLib] Use a RCU mechanism to avoid locking on getting items. #195

Closed Therzok closed 7 years ago

Therzok commented 7 years ago

This is one way of removing all these synchronization points, lockless read, locked write

Therzok commented 7 years ago

I fear for this change, and would rather go the ThreadStatic route for a couple of reasons:

  1. The copies might take a long time. I don't want to copy CerHashtable from the mono source code to get a lockless read, locked write hashtable.
  2. Most of the data is constructed on the UI thread, thus we need to have the optimized route there. The impact of having additional activator copies for a bg thread is negligible