guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request to add *-resize! functions for contiguous mutable data struc


From: Vijay Marupudi
Subject: Re: Request to add *-resize! functions for contiguous mutable data structures.
Date: Sun, 8 Aug 2021 23:02:19 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]