title: How to make a custom class Codable?
body: <p>I'm using a thread safe dictionary found on <a href="https://github.com/geekaurora/ThreadSafeDictionary" rel="nofollow noreferrer">Github</a></p>
  <p>But how to make the <code>ThreadSafeDictionary</code> in that repo conform to the <code>Codable</code>?</p>
  <p>It seems initialise a new lock in the encoder function would help? </p>