Skip to content

Add a lock around the method generation#116

Merged
DavidCEllis merged 3 commits into
mainfrom
add-locking
Jun 19, 2026
Merged

Add a lock around the method generation#116
DavidCEllis merged 3 commits into
mainfrom
add-locking

Conversation

@DavidCEllis

Copy link
Copy Markdown
Owner

This prevents the method from being generated multiple times in a multi-threaded workload. The first call should acquire the lock and generate the method, replacing it on the class. Any attribute retrievals before the method is replaced will get the first generated method, any calls after will not see the descriptor as it has been replaced.

@DavidCEllis DavidCEllis merged commit 744be13 into main Jun 19, 2026
5 checks passed
@DavidCEllis DavidCEllis deleted the add-locking branch June 22, 2026 16:01
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.

1 participant