Closed 0xF6 closed 1 month ago
The changes introduce a comprehensive update to threading management in the Ishtar virtual machine's runtime. Enhancements include the addition of several new methods for thread creation, management, and synchronization, along with structural changes to relevant classes and functions. These updates improve thread handling, ensuring better performance and accuracy in multithreaded scenarios.
File Path | Change Summary |
---|---|
runtime/ishtar.vm/__builtin/B_Threading.cs |
Enhanced thread management: updated methods, signatures, and logic for thread operations. |
runtime/ishtar.vm/runtime/io/IshtarRawThread.cs |
Added name parameter to IshtarRawThread constructor and initialization. |
runtime/ishtar.vm/runtime/io/IshtarThread.cs |
Implemented threading equality, new enums, methods for status tracking, and IshtarJob struct. |
runtime/ishtar.vm/runtime/io/IshtarThreading.cs |
Added field for thread list, updated CreateRawThread to include name parameter, added logic for thread creation/destruction. |
runtime/ishtar.vm/runtime/io/TaskScheduler.cs |
Introduced new enqueue method and updated CreateRawThread call with additional string parameter. |
sequenceDiagram
participant User
participant B_Threading
participant TaskScheduler
participant IshtarThreading
participant IshtarJob
User->>+B_Threading: createThread(current, args)
B_Threading->>+TaskScheduler: Execute Task
TaskScheduler->>+IshtarThreading: CreateRawThread(module, frame, name)
IshtarThreading->>-TaskScheduler: Return IshtarThread
TaskScheduler->>-B_Threading: Task Enqueued
B_Threading->>-User: Thread Created
Note over User,B_Threading: Thread is running
User->>+B_Threading: join(current, args)
B_Threading->>+IshtarThreading: DestroyThread(thread)
IshtarThreading->>-B_Threading: Thread Destroyed
B_Threading->>-User: Thread Joined
In threads we weave and spin the tale,
Code once lonely now sets sail.
Withcreate
,start
, and jobs that blend,
New methods guide to threads' sweet end.
Synchrony and sleep will hold the line,
Now in Ishtar, threads align.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
Summary by CodeRabbit
New Features
Improvements
Updates