Recent

Author Topic: concurrent data structures  (Read 3284 times)

baleog

  • Newbie
  • Posts: 2
concurrent data structures
« on: March 02, 2017, 06:42:34 pm »
Hello!

What package should I use for the concurrent data structures? Something like C# ConcurrentDictionary

And where can I find atomic/interlocked functions?

thank you

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: concurrent data structures
« Reply #1 on: March 02, 2017, 06:45:28 pm »
There is only syncobjs.tthreadlist, and it requires additional code (lock, getlist, unlock)

baleog

  • Newbie
  • Posts: 2
Re: concurrent data structures
« Reply #2 on: March 02, 2017, 06:59:33 pm »
Sorry, but https://github.com/BeRo1985/pasmp is not what i'm looking for?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: concurrent data structures
« Reply #3 on: March 02, 2017, 10:06:56 pm »
Don't know, I replied from what I know was is prepackaged. I don't know every site on the web.

Here might also help: http://pages.videotron.com/aminer/

or his newer site: https://sites.google.com/site/aminer68/

Thaddy

  • Hero Member
  • *****
  • Posts: 18924
  • Glad to be alive.
Re: concurrent data structures
« Reply #4 on: March 03, 2017, 08:13:03 am »
Hello!
What package should I use for the concurrent data structures? Something like C# ConcurrentDictionary
And where can I find atomic/interlocked functions?
thank you

The interlocked functions and the low-level base handling are in system. A TMRWE class is in rtl/objpas. In trunk there's also a generic ThreadList<T> in packages/rtl-generics.
There's also a syncobjs unit with some higher level encapsulation in fcl-base. And we have cthreads and pthreads for the nixes. TThreadList<T> comes closest to ConcurrentDictionary and can serve to derive a  TConcurrentDictionary <TKey,TValue>
« Last Edit: March 03, 2017, 08:36:15 am by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

 

TinyPortal © 2005-2018