unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
Cc: guile-user@gnu.org
Subject: Re: guile fibers - looking for adivce
Date: Mon, 7 Sep 2020 18:34:40 +0200	[thread overview]
Message-ID: <20200907183440.3407cd18@interia.pl> (raw)
In-Reply-To: <8f3fb4a5-4bad-4ebf-77bf-78826fdbc996@posteo.de>

Hi!

Dnia 2020-09-06, o godz. 02:42:20
Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> napisał(a):

> Hi Jan!
>
> Call me uneducated, but I believe, if you are accessing shared memory,
> in this case the shared member vector of the object, you will have to
> resort to things like locking mechanisms. I don't know of any other
> way, except for not using shared memory and keeping one copy per
> fiber or per concurrently running execution unit.
I'll probably go with some locking mechanism then.

> Is there a way you could avoid sharing the object? Perhaps copying it
> for each fiber?
Fortunately, at least for now, one procedure updates the array and the
other only reads it. We'll see how scalable is my idea when the project
grows. 

> If not, then perhaps there is yet another way. A while ago I read some
> article, which had the heading "pull not push" or something. So
> instead of having multiple concurrent execution units trying to
> update the vector, perhaps you could have multiple concurrent
> execution units, which are each responsible for some exclusive part
> of the state of a data structure and working on their own parts of
> the memory of it and update it by retrieving information from the
> system. Perhaps this is clearer, if I link to the article I read:
Sounds interesting, thanks. Maybe I'll find use for this later.

> https://nullprogram.com/blog/2020/04/30/
> 
> This might only work in cases, where the data lends itself to such
> "other way around" of updating state.
> 
> > Thanks in advance
> > Jan Wielkiewicz
> 
> Out of ideas for now.
> 
> Regards,
> Zelphir
> 
> 

Anyway, thanks for ideas.

Jan Wielkiewicz



  reply	other threads:[~2020-09-07 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06  0:47 guile fibers - looking for adivce Jan Wielkiewicz
2020-09-06  0:42 ` Zelphir Kaltstahl
2020-09-07 16:34   ` Jan Wielkiewicz [this message]
2020-09-06  1:19 ` Aleix Conchillo Flaqué
2020-09-07 16:56   ` Jan Wielkiewicz
2020-09-08  0:25     ` Aleix Conchillo Flaqué
2020-09-08  7:48       ` Chris Vine
2020-09-08 17:56         ` Aleix Conchillo Flaqué
2020-09-10  1:05       ` Jan Wielkiewicz
2020-09-06 19:26 ` Chris Vine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200907183440.3407cd18@interia.pl \
    --to=tona_kosmicznego_smiecia@interia.pl \
    --cc=guile-user@gnu.org \
    --cc=zelphirkaltstahl@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).