comp.lang.ada
 help / color / mirror / Atom feed
From: rrr.eee.27@gmail.com
Subject: Re: tasking design considerations
Date: Fri, 20 Jan 2017 04:32:26 -0800 (PST)
Date: 2017-01-20T04:32:26-08:00	[thread overview]
Message-ID: <7552bc76-fba8-4208-b855-e47140986488@googlegroups.com> (raw)
In-Reply-To: <o5sihq$19ul$1@gioia.aioe.org>

On Friday, January 20, 2017 at 9:42:36 AM UTC+1, Dmitry A. Kazakov wrote:
...
> Yes. Two minor notes:
> 
> 1. It is not a stack (LIFO) it a FIFO, I suppose you want to keep the 
> messages ordering.

OK, yes, it is a FIFO storage.
 
> 2. You don't need a protected object or other locking method because a 
> FIFO with a single writer and a single reader is task-safe (can be 
> designed lock-free).
> 

I don't understand. It might be that the task reading the FIFO starts while a callback is active adding a message to the FIFO. I think there must be a lock to exclude reading and writing the FIFO at the same time.

RE


  reply	other threads:[~2017-01-20 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  8:07 tasking design considerations rrr.eee.27
2017-01-20  8:29 ` Björn Lundin
2017-01-20  8:42 ` Dmitry A. Kazakov
2017-01-20 12:32   ` rrr.eee.27 [this message]
2017-01-20 14:11     ` Dmitry A. Kazakov
2017-01-20 16:01 ` Jeffrey R. Carter
replies disabled

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