Skip to content

refactor: add move constructor to handle/loose_handle/rhandle - #3417

Merged
ice0 merged 5 commits into
synfig:masterfrom
rodolforg:etl-move-constructor
Sep 8, 2024
Merged

ice0 merged 5 commits into
synfig:masterfrom
rodolforg:etl-move-constructor

Conversation

@rodolforg

Copy link
Copy Markdown
Contributor

Split from PR #3071 . That one will be only about moving last ETL files to synfig-core.

Comment thread ETL/ETL/_handle.h
/** Copy constructor */
rhandle(const rhandle<value_type> &x):handle<T>(x)
{
if(obj)add_to_rlist();

@rodolforg rodolforg Sep 8, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the rhandle::next_, rhandle::prev_, rshared_obj::front_ and rshared_obj::back_ should be guarded by a mutex.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. Since it is possible to access the same object from multiple threads, it is a good idea.

@ice0
ice0 merged commit 02b4d08 into synfig:master Sep 8, 2024
@ice0

ice0 commented Sep 8, 2024

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

@rodolforg
rodolforg deleted the etl-move-constructor branch September 15, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants