Skip to content

Scope declared instance#2082

Merged
arnaudgiuliani merged 4 commits into
4.0.1from
scope_declared_instance
Dec 17, 2024
Merged

Scope declared instance#2082
arnaudgiuliani merged 4 commits into
4.0.1from
scope_declared_instance

Conversation

@arnaudgiuliani

Copy link
Copy Markdown
Member

Replace usage of ScopedInstance holder to limit usage of declared instance to current scope, and avoid any reuse.

@arnaudgiuliani arnaudgiuliani merged commit 849f169 into 4.0.1 Dec 17, 2024
@arnaudgiuliani arnaudgiuliani deleted the scope_declared_instance branch December 17, 2024 20:48
class DeclaredScopedInstance<T>(beanDefinition: BeanDefinition<T>, val scopeID : ScopeID) :
InstanceFactory<T>(beanDefinition) {

private var value : T? = null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is not thread-safe.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

declare function is synchronized. But this will be fixed. I manage to fix that point

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