Jump to content
Sign in to follow this  
Guest

generics collections and containers

Recommended Posts

Guest

can we have generics collections and lock-free containers?

Share this post


Link to post

What type of collections do you have in mind?

Not all types of collections can be implemented completely lock-free in an efficient way or they are hilariously complex to implement.

Depending on the implementation some operations might not have the same characteristics of a regular thread-unsafe implementation.

Share this post


Link to post
Guest

mostly all of them 🙂 ... eg TOmniBlockingCollection when using with IOmniParallelLoop<TLogItem>;

 

to add the item you can't insert TLogItem directly but have to Add it with TOmniValue, s/t like TOmniBlockingCollection<TLogItem> would be much easier to use

 

the name does not say anything that it's a lock-free collection, it could be lock-free just for primitive types 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×