comp.lang.ada
 help / color / mirror / Atom feed
From: hanslad@gmail.com
Subject: Re: pragma Thread_Local_Storage on record?
Date: Tue, 1 Mar 2016 08:31:43 -0800 (PST)
Date: 2016-03-01T08:31:43-08:00	[thread overview]
Message-ID: <d961a0d2-2a77-4dc5-b191-0a0285126a66@googlegroups.com> (raw)
In-Reply-To: <nb4e2o$bq8$1@gioia.aioe.org>

> I don't see how his could be useful for a messages queue which is 
> normally shared between several tasks rather than owned by any. The 
> latter looks like a low-level implementation-motivated design.

To explain a bit more: This is just an experiment on implement a small framework where a set of tasks(one per core) handles a sent of workers that are messaged by other workers (actor style... I think). The reason for using Thread_Local_Storage is for performance)I read that somewhere that it could be a performance gain using that). The idea is that other workers(handled by other tasks) are sending messages to workers, the workers are at the same time added to the queue of workers, ready for action. I dont know if this makes any sense... :-). If this idea has obvious flaws, please feel free to comment.


> A typical solution is Ada.Task_Attributes instantiated with an access 
> type to the object. The object is allocated on demand (access 
> dereference by the owner task).

I have considered this, but wanted to try the Thread_Local_Storage pragma for performance reasons.

Thanks.



  reply	other threads:[~2016-03-01 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 13:45 pragma Thread_Local_Storage on record? hanslad
2016-03-01 14:44 ` Florian Weimer
2016-03-01 15:22   ` hanslad
2016-03-01 15:55     ` Dmitry A. Kazakov
2016-03-01 16:31       ` hanslad [this message]
2016-03-01 17:03         ` Dmitry A. Kazakov
2016-03-01 15:52 ` J-P. Rosen
replies disabled

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