Skip to content

Fix lambdas executing procedures with the wrong thread - #195

Open
the-can-of-soup wants to merge 3 commits into
PenguinMod:developfrom
the-can-of-soup:patch-3
Open

Fix lambdas executing procedures with the wrong thread#195
the-can-of-soup wants to merge 3 commits into
PenguinMod:developfrom
the-can-of-soup:patch-3

Conversation

@the-can-of-soup

@the-can-of-soup the-can-of-soup commented Aug 4, 2026

Copy link
Copy Markdown

Resolves

#194

Proposed Changes

Stores references to procedure factories after a thread finishes compiling, and makes the Lambda extension use these factories to execute procedures in the proper thread.

Reason for Changes

Without a fix, lambdas could cause unpredictable execution behavior with custom blocks.


I STILL cannot figure out how to get a local PenguinMod instance running, so I have been unable to test this. Would appreciate if someone else could. An example to test with is uploaded in the Discord bug reports post.

Edit: I finally got it working! I have tested and confirmed that this pull request would fix the bug if merged (compare with the example output images in #194):

Screenshot of example program output displaying the same thread used for executing a custom block in a lambda as the thread executing the lambda

@the-can-of-soup

Copy link
Copy Markdown
Author

I have tested and confirmed that this pull request fixes #194.

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