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? >