Freja Nordsiek <fnord...@gmail.com> writes: > Hmm, just realized, to add on top of what you said, method has a major > thread-safety problem if the bytevector output port is accessed from > more than one thread. Definitely need to fix this.
In Guile, port operations are not specified to include built-in thread synchronization. Thread synchronization is quite expensive on most platforms, and only needed in a small minority of cases, so it should be added by the application where needed. Bytevector port operations could be made quite cheap in a future implementation of Guile with native code generation, and we should avoid making promises that would add significant work to inherently inexpensive operations. Thanks, Mark