Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[std] Move target.vm.Thread (and friends) to sys.thread.Thread #7999

Merged
merged 13 commits into from
Mar 17, 2019

Conversation

Simn
Copy link
Member

@Simn Simn commented Mar 16, 2019

This PR moves types neko.vm.Thread to sys.thread.Thread. It also adds @:coreApi to the neko, cpp and java classes. It does not add @:coreApi for HL and eval because their interfaces are not 100% compatible. I consider this a separate (non-)issue though.

This currently breaks the hxcpp build tool because it relies on neko.vm.Thread. This raises the question of deprecation strategy. We can add typedefs to hx3compat, or to std itself. I think we should fix the hxcpp build tool independently.

TODO

  • Deal with deprecation
  • Adjust hxcpp build tool (after merging?)
  • Make it error on targets that don't have thread support (I wanted to add a define for that but for now we can just hardcode this in the std/sys/thread files)
  • Find someone to tell me that this is a good idea

@Simn Simn self-assigned this Mar 16, 2019
@Simn
Copy link
Member Author

Simn commented Mar 16, 2019

I'm keeping the typedefs in std for now because it conveniently also deals with the hxcpp build tool problem.

Last thing to do is make this fail on non-threaded targets. We have to be a bit careful with ImportAll/dox in that regard.

@Simn Simn marked this pull request as ready for review March 16, 2019 20:08
package sys.thread;

#if (!target.threaded)
#error "This target is not available on this target"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This class" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh god I need vacation...

@Simn Simn merged commit 320fff2 into HaxeFoundation:development Mar 17, 2019
@Simn Simn deleted the sys.thread branch March 17, 2019 10:29
back2dos pushed a commit to back2dos/haxe that referenced this pull request Oct 5, 2021
…oundation#7999)

* [std] move all thread classes to sys.thread

* [neko] add @:coreApi

* [cpp] add @:coreApi

* [java] add @:coreApi

* [std] purge redundant documentation

* [std] document Deque and Lock

* [tests] fix java.vm leftovers

* [std] add deprecation typedefs

* [std] fix Tls

* [std] fix Deque

* [typer] error if we access sys.thread on non-threaded target

* [std] nobody saw that
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.

None yet

2 participants