Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The challenge of using mutexs to protect shared resources is that it’s too easy for:

Mainly it’s the first problem.

We ran into this with the release of Iguana 4 which was the first multi-threaded version of Iguana. Had huge problems with QA until we adopted this architecture idea thanks to Andrew VVajocski.

Instead what we do is have threads own particular data-structures and all communication between threads is performed using thread safe queues. This gives us reliability by design. Historically we used the /wiki/spaces/DEVELOPMEN/pages/612271687 to solve this because of the high number of /wiki/spaces/DEVELOPMEN/pages/965771307 in Iguana at the time.

These days we are trending towards using threads for much narrower tasks where the thread owns the data given to it until it is done and then returns state to the main thread using the /wiki/spaces/DEVELOPMEN/pages/6750336by posting back to the event loop.

See: https://en.wikipedia.org/wiki/Shared-nothing_architecture