Thread send and read no longer implemented

Open
#1,464 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
40/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
devtools

Research direction

The stubs __hxcpp_thread_send and __hxcpp_thread_read_message live in src/hx/Thread.cpp, around line 171, where they now return Not Implemented. Start by checking the commit aef979a to see what was removed and how HXCPP_API_LEVEL is consulted. Done means the sample Thread.current().sendMessage("hello") runs on older Haxe versions without the error.

Written by the indexing model from the issue text.

Description

bug regression

Since aef979acfdd002ad3aaa55cda180bff40170da28, __hxcpp_thread_send and __hxcpp_thread_read_message no longer implemented:

https://github.com/HaxeFoundation/hxcpp/blob/a04a2c4c15b54162a91d87923a3e3ef44aca72d0/src/hx/Thread.cpp#L171

This is a breaking change and causes runtime errors with haxe 4.1 and below for programs that worked fine with hxcpp 4.3.2:

class Main {
        static function main() {
                sys.thread.Thread.current().sendMessage("hello");
        }
}
$ haxe -main Main -cpp bin && bin/Main 
Error : Not Implemented

We should keep some implementation for these until we drop support for HXCPP_API_LEVEL older than 420. These functions are used by haxe std until: https://github.com/HaxeFoundation/haxe/commit/3e4e6288f07c16828d1161c582b4dafedda88cac

Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.