Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocking data structures #21

Open
tobias-schuele opened this issue Nov 17, 2016 · 2 comments
Open

Blocking data structures #21

tobias-schuele opened this issue Nov 17, 2016 · 2 comments
Labels

Comments

@tobias-schuele
Copy link
Member

Many users need concurrent data structures but not necessarily lock-free or wait-free ones (which are already available in EMB²). For example, if an application is not timing critical, blocking data structures might be beneficial w.r.t memory consumption and context switching. Implement thread-safe wrappers for the following data structures provided by the standard library:

  • set
  • map
  • stack
  • queue
  • priority_queue
@tobias-schuele
Copy link
Member Author

tobias-schuele commented Nov 17, 2016

Comments from JIRA:


Some of the structures of the std library, namely stacks, queues, priority_queues, rely on a SequenceContainer (e.g. std::vector) for the internal representation of the object. If all of those containers make use of dynamic memory allocation it might be necessary to implement those data structures from scratch. I have already done that for stacks and queues.


I agree, memory allocation is an issue here.


Needs further discussion and decision regarding what will be implemented and how the naming of the containers is.


I merged all the branches of the subtickets into embb499_blocking_data_structures. See 757282b 3838dc3


Usually, a range is sufficient, however here we have a tree, e.g., commit 863eac has parents c511228 and c21ffa7 Please give a list of commits.


See:
757282b
173916a
1c75c01
d9a6be5
0deb6bf
e9e7006
ad5d2ef
c21ffa7
ce77c47
54757fc
b4337ce
90ba70e
c511228
863eac1
526d902
ecd1ecd
b8e7162
e59cccf
db17162
f5ca8fe
3838dc3

@sebhub
Copy link
Contributor

sebhub commented May 19, 2017

Maybe you have a look at Boost.Intrusive:

http://www.boost.org/doc/libs/1_64_0/doc/html/intrusive.html

Does it really make sense to simply wrap a lock around the container? Normally, you have the containers with additional state which needs also protection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants