Project

General

Profile

Feature #157

Separate ThreadsafeCounter from symbol.C

Added by John Abbott almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tidying
Target version:
Start date:
10 May 2012
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:

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

Related to CoCoALib - Feature #156: Brand new symbol(s)Closed2012-05-07

Related to CoCoALib - Feature #142: Improve threadsafetyIn Progress2012-04-30

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!

Also available in: Atom PDF