Skip to content

Add support for subscribing to callbacks that return Task#1486

Merged
xPaw merged 3 commits intomasterfrom
async-callbacks
Mar 26, 2026
Merged

Add support for subscribing to callbacks that return Task#1486
xPaw merged 3 commits intomasterfrom
async-callbacks

Conversation

@xPaw
Copy link
Copy Markdown
Member

@xPaw xPaw commented Jan 4, 2025

@yaakov-h what do you think will this work?

Fixes #1464

@yaakov-h
Copy link
Copy Markdown
Member

yaakov-h commented Jan 5, 2025

I don't like blocking waiting for the task, but since we want thread affinity.. 🤔

Might be worth converting all callbacks to ValueTask.

@xPaw
Copy link
Copy Markdown
Member Author

xPaw commented Jan 5, 2025

I don't like blocking waiting for the task

Non task callbacks already block, so not sure what difference that makes here.

Might be worth converting all callbacks to ValueTask.

How would that look?

@xPaw xPaw force-pushed the async-callbacks branch from 4c70d61 to 5dcf77a Compare January 5, 2025 12:03
@xPaw
Copy link
Copy Markdown
Member Author

xPaw commented Jan 29, 2025

I don't see how ValueTask can be applied here, so I would stick with Task.

@xPaw xPaw requested a review from yaakov-h June 4, 2025 07:44
@xPaw xPaw force-pushed the async-callbacks branch from 5dcf77a to 21596f9 Compare March 22, 2026 10:24
Copy link
Copy Markdown
Contributor

@JustArchi JustArchi left a comment

Choose a reason for hiding this comment

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

Tests done via https://github.com/JustArchiNET/ArchiSteamFarm/compare/sk2-test

No regressions observed, LGTM

@xPaw xPaw merged commit 5aabe27 into master Mar 26, 2026
17 checks passed
@xPaw xPaw deleted the async-callbacks branch March 26, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CallbackMgr: Allow subscribing to callbacks that return Task

3 participants