#48 calling mocked methods is not thread-safe

closed
None
2014-05-29
2014-02-18
Kosta
No

Similar to issue #47 calling mocked methods from different threads is not thread-safe; all the book-keeping need to be protected by a mutex (e.g., the calling counters go easily out-of-sync). I would like to add this simple patch to fix this behavior: https://github.com/AIM360/turtle/commit/1267fe714af5139eb698286be0d9c2c395ba16b6

Discussion

  • Mathieu Champlon

    • status: open --> accepted
    • assigned_to: Mathieu Champlon
     
  • Mathieu Champlon

    Hi Kosta and sorry for the delay.

    This is currently under work and although I was hoping to be able to avoid recursive mutexes, this is likely the easiest solution indeed.

    Cheers,
    MAT.

     
  • Mathieu Champlon

    Thread safety has been introduced in http://sourceforge.net/p/turtle/code/730/
    In order to activate the feature the symbol MOCK_THREAD_SAFE must be defined before including the library.

    Does this meet your expectations?
    I'll make a new release shortly but in the meanwhile any feedback will be greatly appreciated!

    Thanks,
    MAT.

     
  • Mathieu Champlon

    • status: accepted --> pending
     
  • Mathieu Champlon

    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks