Skip to content

Thread Changes Cleanup#1345

Open
Aidan63 wants to merge 7 commits into
HaxeFoundation:masterfrom
Aidan63:thread-cleaup
Open

Thread Changes Cleanup#1345
Aidan63 wants to merge 7 commits into
HaxeFoundation:masterfrom
Aidan63:thread-cleaup

Conversation

@Aidan63
Copy link
Copy Markdown
Contributor

@Aidan63 Aidan63 commented May 25, 2026

This contains various bits of cleanup related to the c++11 threading changes from the last few merges.

  • All the old __hxcpp_ functions are now excluded unless building for haxe 4 (it's a shame we can't conditionally remove that old Thread.cpp file from the build xml).
  • Various internal uses of HxCreateDetachedThread have been replaced with a detached std::thread so that function can be removed.
  • std::this_thread::sleep_for is now used internally instead of #ifdef's for various OS'
  • You can use the HXCPP_THREAD_XML define to point to a build xml file which will provide implementations for the hx::thread api instead of the built in one.
  • Added a few tests for the Scratch type which was added in the typed thread PR.

I've put some more thoughts on the structure of these threading changes in this issue #1279

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