-
Notifications
You must be signed in to change notification settings - Fork 224
C++11 std mutex and condition variable #1298
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
90732bb
Add new mutex and condition types
9f44f3f
Update c functions to use new impl
1b1747f
recursive mutex
8e0615e
Merge branch 'master' into std-synchronisation
Aidan63 bc1cf9a
Update src/hx/thread/ConditionVariable.cpp
Aidan63 b775337
Non recursive mutex for condition variable
63ea825
Remove timed wait which isn't actually used anywhere
3c17ade
Revert "Remove timed wait which isn't actually used anywhere"
5347182
Use an atomic_int for the thread id
0a7b031
Update telemetry implementations to use std::mutex
67cbfe1
std::mutex for __hxcpp_field_to_id
82ea075
std::mutex for profiler
7735013
std::mutex for debugging
33ea04d
std::mutex for gc
fa36391
try recursive mutex for telemetry
7fac36f
Revert "std::mutex for gc"
cb565f2
std::mutex for finaliser and root protection
862b923
std::mutex for large object heap
21ac9fa
recursive mutex for special object and state change locks
4c6d59b
pointers to condition variables
aaead48
Use wait overload instead of manual while loops
7ba03d0
non recursive mutex for thread pool lock
1f999bc
non recursive mutex for special object lock
5aa26a1
non recursive mutex for state change lock
abd300a
Remove function not used in haxe
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #pragma once | ||
|
|
||
| #ifndef HXCPP_H | ||
| #include <hxcpp.h> | ||
| #endif | ||
|
|
||
| HX_DECLARE_CLASS2(hx, thread, ConditionVariable) | ||
|
|
||
| namespace hx | ||
| { | ||
| namespace thread | ||
| { | ||
| struct ConditionVariable_obj : public hx::Object | ||
| { | ||
| ConditionVariable_obj(); | ||
|
|
||
| void acquire(); | ||
| bool tryAcquire(); | ||
| void release(); | ||
| void wait(); | ||
| void signal(); | ||
| void broadcast(); | ||
|
|
||
| private: | ||
| struct Impl; | ||
|
|
||
| Impl* impl; | ||
| }; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #pragma once | ||
|
|
||
| #ifndef HXCPP_H | ||
| #include <hxcpp.h> | ||
| #endif | ||
|
|
||
| HX_DECLARE_CLASS2(hx, thread, RecursiveMutex) | ||
|
|
||
| namespace hx | ||
| { | ||
| namespace thread | ||
| { | ||
| struct RecursiveMutex_obj : public hx::Object | ||
| { | ||
| RecursiveMutex_obj(); | ||
|
|
||
| void acquire(); | ||
| void release(); | ||
| bool tryAcquire(); | ||
|
|
||
| private: | ||
| struct Impl; | ||
|
|
||
| Impl* impl; | ||
| }; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.