Skip to content

Conversation

@TosterHolokoster
Copy link
Contributor

For the issue #103. This example shows basic usage of the thread pool.

I aimed to make the example as beginner-friendly as possible. However, it means that the example doesn't demonstrate the full power of the thread poll. Therefore, it is a basic example. I hope at some point someone (maybe me) will add an advanced example. Something like a loop of waiting, popping complete tasks, and adding new ones in their place.

Checklist before submitting:

  • This example has been added to .github/workflows/check.yml (for automatic testing)
  • This example compiles cleanly with flags -vet -strict-style -vet-tabs -disallow-do -warnings-as-errors
  • This example follows the core naming convention: https://github.com/odin-lang/Odin/wiki/Naming-Convention (exception can be made for ports of examples that need to match 1:1 to the original source).
  • By submitting, I understand that this example is made available under these licenses: Public Domain and Odin's BSD-3 license. Only for third-party dependencies are other licenses allowed.

@karl-zylinski
Copy link
Collaborator

Thanks for the PR. I've added a new style convention document, please read it and correct the style in this example: https://github.com/odin-lang/examples/wiki/Naming-and-style-convention

@TosterHolokoster
Copy link
Contributor Author

I updated the code to comply with the new style convention. However, I left a separate declaration/definition for some variables. It helps explain things and splits the code into bit-sized pieces. Hope you're fine with it.

@karl-zylinski
Copy link
Collaborator

Sorry for the delay. I'm looking for someone to review this, since it is not my area of expertise.

@karl-zylinski karl-zylinski merged commit 9e4ecf2 into odin-lang:master Oct 13, 2025
1 check passed
@karl-zylinski
Copy link
Collaborator

Thank you for the PR!

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.

2 participants