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

Unimplemented locking in ActivityTaskHandler #1083

Open
MarkCiliaVincenti opened this issue May 1, 2024 · 0 comments
Open

Unimplemented locking in ActivityTaskHandler #1083

MarkCiliaVincenti opened this issue May 1, 2024 · 0 comments

Comments

@MarkCiliaVincenti
Copy link

I've noticed that in ActivityTaskHandler there's this unused code:

        //TODO: Eventually these will need to be Redis locks once we have a multiple worker scenario
        private readonly SemaphoreSlim incomingQueueLock = new SemaphoreSlim(1);

        //TODO: This locking approach currently has a race condition that allows an activity task to be called multiple
        // times. Will likely require a somewhat substantial redesign to fix.
        private readonly ConcurrentDictionary<int, SemaphoreSlim> taskLocks;

Was there some intention to be some locking here? I can help with implementing AsyncKeyedLock here, which is used in https://github.com/Azure/apiops, https://github.com/microsoft/Vipr and https://github.com/microsoft/kiota

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

No branches or pull requests

1 participant