Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-07

is there a circular queue implementation already in FPC or FCL?

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Schreiber
to Dennis Poon: if not, I shall write my own. Just want to check first. Thanks. Dennis
Dennis Poon wrote
if not, I shall write my own. Just want to check first.

All tdatalist descendants in MSEgui can be used as circular queue: http://gitorious.org/mseide-msegui/mseide-msegui/blobs/master/lib/common/kernel/msedatalist.pas

There is also tpointerqueue and descendants:
http://gitorious.org/mseide-msegui/mseide-msegui/blobs/master/lib/common/kernel/mselist.pas

Martin

Reply by email

Dennis Poon
to Martin Schreiber

thanks Martin.

But that looks a bit too complex. I only need something simpler and preferably in generics style.
It is used for tcp data buffering which needs to be fast.

I will just write it myself.

Dennis

Martin Schreiber wrote 24 lines
On Friday 26 July 2013 17:19:52 Dennis Poon wrote: > if not, I shall write my own. Just want to check first. > > All tdatalist descendants in MSEgui can be used as circular queue: http://gitorious.org/mseide-msegui/mseide-msegui/blobs/master/lib/common/kernel/msedatalist.pas There is also tpointerqueue and descendants: http://gitorious.org/mseide-msegui/mseide-msegui/blobs/master/lib/common/kernel/mselist.pas Martin _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3349 / Virus Database: 3209/6524 - Release Date: 07/26/13

Reply by email

Michael Schnell
to Dennis Poon

I know abouit these (e.g.):

------------------------------------------------------------------------

* Module: Parallel lockfree Fifo MPMC Queue
* Version: 1.12 * Author: Amine Moulay Ramdane
* and
* modified and enhanced by Amine Moulay Ramdane
* Company: Cyber-NT Communications
*
* Email:
* Website: http://pages.videotron.com/aminer/
* Date: June 30, 2009
* Last update: December 11,2011
*
* Copyright ? 2009 Amine Moulay Ramdane.All rights reserved

------------------------------------------------------------------------

* free-lock queue
*
* Language: FPC Pascal v2.2.0+ / Delphi 6+
* Required switches: none
* Author: Dariusz Mazur
* Date: 20.01.2008
* Version: 0.6
* Licence: MPL or GPL *

------------------------------------------------------------------------

Perfect Classes RC
By Eli Yukelzon a.k.a Fulgore

-> pcQueue

------------------------------------------------------------------------

"FifoStram"

------------------------------------------------------------------------

(* TJpQueue ... a queue class. Also known as FIFO (First in, first out). *)
(* Joachim Pimiskern, 2004, Freeware. *)

------------------------------------------------------------------------ unit Pipe;
{ Author: Juergen Ruemmler
EMail:
Version: 1.2 Stand: 06.01.2003
Legal issues: Copyright (C) 1998, 1999 by Juergen Ruemmler Brockdorffstr. 27a, 22149 Hamburg, Deutschland
TPipe ist Freeware.

------------------------------------------------------------------------ Hope this helps,
-Michael

Reply by email