quickfix icon indicating copy to clipboard operation
quickfix copied to clipboard

Race Condition when passing message to external coroutine

Open kidphys opened this issue 6 years ago • 0 comments

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?

kidphys avatar Mar 29 '19 08:03 kidphys