Skip to content

Fix the last queued job being skipped after pre-parsing - #44

Open
gabriel-andreescu wants to merge 1 commit into
Orvid:masterfrom
gabriel-andreescu:fix-job-queue-drain
Open

gabriel-andreescu wants to merge 1 commit into
Orvid:masterfrom
gabriel-andreescu:fix-job-queue-drain

Conversation

@gabriel-andreescu

Copy link
Copy Markdown

Compiling a single Fallout 4 script without --parallel-compile can return success without writing a PEX. I reproduced this with a script containing only Scriptname QueueCheck.

This became reproducible after c9e91d2 added input pre-parsing for namespace resolution. The same input produces a PEX on its parent commit.

Pre-parsing can complete a read job before the queue is drained. tryDeque() advances past that job but returns false because it has already run. With only the write job left, queuedItemCount is zero and the worker shuts down before writing the PEX.

Return the dequeued job whenever the queue advances. tryRun() already skips completed jobs, so draining continues to the final job.

The single-script case now produces its PEX. Single-file and directory compilation also passed for Skyrim and Fallout 4, both sequentially and in parallel.

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