quickfix
quickfix copied to clipboard
Race Condition when passing message to external coroutine
In: https://github.com/quickfixgo/quickfix/blob/bbe42d9f62205321fa6b61c46f22fe073b814467/tag_value.go#L43-L44 TagValue.bytes is stored as rawFieldBytes from the BufferPool.
Also when cloning a message, the tagvalue is not copied over, but using append() which may not be threadsafe.
https://github.com/quickfixgo/quickfix/blob/bbe42d9f62205321fa6b61c46f22fe073b814467/tag_value.go#L18-L20
When I clone the message and pass to another coroutine to process, Race Condition occurs.
Is this the intended behavior of the code, and am I understanding this righ?