Skip to content

Comments

Bugfix: Replace instances of TaskWait with a new version that automatically calls YieldAsynchronousTask internally#1404

Merged
rhennigan merged 4 commits intomainfrom
bugfix/471530
Feb 23, 2026
Merged

Bugfix: Replace instances of TaskWait with a new version that automatically calls YieldAsynchronousTask internally#1404
rhennigan merged 4 commits intomainfrom
bugfix/471530

Conversation

@rhennigan
Copy link
Member

No description provided.

…atically calls `YieldAsynchronousTask` internally
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new taskWaitYield function that serves as a replacement for TaskWait, automatically calling Internal\YieldAsynchronousTask` internally to prevent blocking other asynchronous tasks. The implementation uses a polling loop with incremental delays and supports configurable time constraints.

Changes:

  • Added new taskWaitYield function in Utils.wl with Listable attribute and TimeConstraint option support
  • Replaced TaskWait calls with taskWaitYield in VectorDatabases.wl, RelatedWolframAlphaResults.wl, and LLMUtilities.wl
  • Exported taskWaitYield via CommonSymbols.wl for use across the codebase

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Source/Chatbook/Utils.wl Implements the new taskWaitYield function with yield-while-waiting logic and adds configuration constant $initialTaskWaitDelay
Source/Chatbook/PromptGenerators/VectorDatabases.wl Updates local taskWait wrapper to delegate to taskWaitYield instead of TaskWait
Source/Chatbook/PromptGenerators/RelatedWolframAlphaResults.wl Replaces direct TaskWait call with taskWaitYield for API content requests
Source/Chatbook/LLMUtilities.wl Replaces TaskWait with taskWaitYield in LLM synthesis workflow
Source/Chatbook/CommonSymbols.wl Exports taskWaitYield symbol for use across Chatbook packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rhennigan rhennigan merged commit 3ab5823 into main Feb 23, 2026
1 check passed
@rhennigan rhennigan deleted the bugfix/471530 branch February 23, 2026 18:50
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