Feature #157
Separate ThreadsafeCounter from symbol.C
Description
The ThreadsafeCounter
recently added to symbol.C
will be useful elsewhere (e.g. in rings for the ring counter). Separate the impl from symbol.C
, and add doc, tests, examples.
Related issues
History
#1 Updated by John Abbott almost 12 years ago
Consider making a BOOST-free (and possibly non-threadsafe) version so that CoCoALib can be compiled without requiring BOOST (which is v.large).
#2 Updated by John Abbott almost 12 years ago
- Category set to Tidying
- Assignee set to John Abbott
- Target version set to CoCoALib-0.9951
JAA is not sure how to test the threadsafe counter since we don't know how to compile and run multithreaded programs. Anyway the code cam from BOOST, sou it ought to be pretty solid!
I'll try to get this into 0.9951, so that that version has visibly improved threadsafety.
#3 Updated by John Abbott almost 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Separated ThreadsafeCounter
; written documentation.
Used ThreadsafeCounter
inside NewRingID
in ring.C
.
All tests pass.
#4 Updated by Anna Maria Bigatti almost 12 years ago
Does this mean that users are now forced to have boost, or we can have a non-threadsafe version without boost?
#5 Updated by John Abbott almost 12 years ago
Yes, in its current form it requires BOOST.
I can add some #ifdef
directive to make it compile without BOOST (and without being threadsafe)... if you really think it is necessary!