-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bug fixes still in test #20
Merged
Merged
Conversation
This file contains 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
- initial outline and calls to Win32 api only for char and wchar_t, not yet sure what other character types will be supported - renamed ansi_ methods to narrow_ more appropriate than ansi for char type - some test method renames
- added to_environment_map which iterates over the environment block returned by GetEnvionmentStrings and converts it to a map - moved string_conversion.h to strings.h and added index_of and get_sub_string_view
- now checks thread id to ensure we're not called from the thread we represent
- changed mutext to timed mutex to allow timeout when trying to lock - reworked start using templates to limit access based on MANUAL_RESET setting, passing only due time for delayed_callback and due_time and poll_period for synchronization_timer
- installs the include path and the .lib file but not the dll yet
- added timer_test.h for shared timer test code - moved synchronization_timer tests to its own file - renamed foo to simple_object and moved it to its own header file
- reworked operator== and operator!= making them friend functions taking both left and right
- still a work in progress
- same idea as lock_guard but takes a duration representing how long to wait for - no support for wait until at this time
- simple extension to exception with more specific cause
- returns the thread id if running wrapped in an optional, null opt if not running
- changed lock to recursive_timed_mutex, no shared equivalent so had to move to lock_guard everywhere - but that doesn't support timeout so added timed_lock_guard and used that
- implementation for id()
…ecific time period
- minor convenience to_... methods to convert between duration types
- two overloads of each method now, one taking optional with default nullopt and another taking the value
- add header file removed from wait_for.h
- methods now take templated duration rather than milliseconds
- wrong return values
- additional static_assert to ensure tempate numeric type is not bigger than long long, though that should probably be an if instead, either way unlikely to be an isssue since the typical use case is DWORD and we know that's less than long long
Wait duration rework
- added reset to fixture to reset static data between tests, could rework to have fixture per test but this is sufficient for now
- additional tests and/or updates to existing tests
- some may not be defined and this seems like a tedious but effective way to ignore that error
- using the actual value I can see in the header file, unlikely it'll change as that would impact deployed applications
- more fallback values
- returns thread exit code if handle is valid and thread is not still active
- set in stop, not yet exposed anywhere
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Testing