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

Task Service: Schedule threadsafe #600

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Conversation

eliska-n
Copy link
Collaborator

is that right? I find it slightly too easy to be true. I don't know how to test in which thread the task is executed. However, it runs without errors

@eliska-n eliska-n requested a review from ateska August 16, 2024 09:44
asab/task.py Outdated
def do():
self.NewTasks.put_nowait(task)

self.App.Loop.call_soon_threadsafe(do)
Copy link
Contributor

Choose a reason for hiding this comment

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

self.App.Loop.call_soon_threadsafe(self.NewTasks.put_nowait, task) ... without closure

... or do the loop in the "do()" closure

@eliska-n eliska-n requested a review from ateska August 23, 2024 11:13
@eliska-n eliska-n merged commit d476aa8 into master Aug 23, 2024
8 checks passed
@eliska-n eliska-n deleted the feature/task-schedule-threadsafe branch August 23, 2024 11:18
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