comp.lang.ada
 help / color / mirror / Atom feed
From: tonyg <tonythegair@gmail.com>
Subject: Buffer PO
Date: Fri, 3 Jun 2016 06:29:13 -0700 (PDT)
Date: 2016-06-03T06:29:13-07:00	[thread overview]
Message-ID: <1bc41b66-8dd4-4b4e-903e-f314babc07f9@googlegroups.com> (raw)


I have a Fifo buffer in a protect object with a push / pop procedures and an is_empty function storing a gaggle of variant records.

I push just fine but when I come to collect my data with a pop, I have to assign it to a variable which is predeclared.

I cannot use a function as this cannot change the inside of a protected object.

Now I could use an extra buffer to contain the variant record discriminator but is there a better way?

I did think of adding a function to peek at the discriminator, but this could cause a problem as a push may change the record being viewed before my pop.


             reply	other threads:[~2016-06-03 13:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 13:29 tonyg [this message]
2016-06-03 15:35 ` Buffer PO Anh Vo
2016-06-03 16:20 ` Mark Lorenzen
2016-06-03 17:48 ` Jeffrey R. Carter
2016-06-03 19:10 ` Dmitry A. Kazakov
2016-06-04 11:49 ` tonyg
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox