Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow cloning Stream objects #141

Draft
wants to merge 1 commit into
base: 2.26.x
Choose a base branch
from

Commits on Apr 13, 2023

  1. Disallow cloning Stream objects

    Streams hold a reference to the stateful resource handle for their actual
    contents. Cloning a Stream will not actually clone the underlying resource,
    thus both streams would still refer to the same resource after cloning and any
    changes in one stream object would be reflected in the other object. This
    violates user expectations after a cloning operation.
    
    Disallow cloning entirely as the safe default choice. Alternatively a new
    stream could be created and attached and the contents could be copied over.
    This can get expensive with larger or infinite streams, though.
    
    Signed-off-by: Tim Düsterhus <duesterhus@woltlab.com>
    TimWolla committed Apr 13, 2023
    Configuration menu
    Copy the full SHA
    e3db859 View commit details
    Browse the repository at this point in the history