unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Vijay Marupudi <vijaymarupudi@gatech.edu>
To: Taylan Kammer <taylan.kammer@gmail.com>,
	Maxime Devos <maximedevos@telenet.be>,
	guile-devel@gnu.org
Subject: Re: Request to add *-resize! functions for contiguous mutable data structures.
Date: Sun, 8 Aug 2021 23:02:19 -0500	[thread overview]
Message-ID: <065321a9-3c31-c047-c4c8-8843a9e96f51@gatech.edu> (raw)
In-Reply-To: <d8c648c0-fe09-1aa9-f502-a0de9e5bb98f@gmail.com>

Thank you for your responses Taylan and Maxime!

My initial reaction to the concern about multithreaded code is similar
to Taylan. I'm not sure if Guile has multithreading concepts built into
the compiler. If so, one can only check the length again after a mutex.

Appreciate the malloc, realloc, and free FFI solution. Ideally I
wouldn't have to do that, but it does work. I have to manually free it
though.


~ Vijay


On 8/7/21 12:46 PM, Taylan Kammer wrote:
> On 07.08.2021 13:09, Maxime Devos wrote:
> 
>>
>> A problem is that this prevents optimisations and can currently
>> introduce bugs in concurrent code.  Consider the following code:
>>
>> [... snip ... ]
>>
>> Greetings,
>> Maxime.
>>
> 
> Couldn't we just state that resizing a vector/bytevector is a
> thread-unsafe operation?
> 



  reply	other threads:[~2021-08-09  4:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 14:33 Request to add *-resize! functions for contiguous mutable data structures Vijay Marupudi
2021-08-07 10:31 ` Taylan Kammer
2021-08-07 21:19   ` tomas
2021-08-08 12:17     ` Taylan Kammer
2021-08-07 11:09 ` Maxime Devos
2021-08-07 17:46   ` Taylan Kammer
2021-08-09  4:02     ` Vijay Marupudi [this message]
2021-08-09 18:24       ` Maxime Devos
2021-08-09 18:35         ` Vijay Marupudi

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=065321a9-3c31-c047-c4c8-8843a9e96f51@gatech.edu \
    --to=vijaymarupudi@gatech.edu \
    --cc=guile-devel@gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=taylan.kammer@gmail.com \
    /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).