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

Bug fixes still in test #20

Merged
merged 48 commits into from
Aug 16, 2021
Merged

Bug fixes still in test #20

merged 48 commits into from
Aug 16, 2021

Conversation

tsmoreland
Copy link
Owner

Changes

  • corrected various issues to timer, while still under testing it's looking more promising
  • addressed a few build issues when using vs2017 compiler
  • initial environment block support for Environment Block Support #17 still in progress
  • minor warning resolution
  • initial test coverage for timer
  • enhancements to thread

Testing

  • primarily unit tests

- 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
- 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()
- 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
tsmoreland and others added 18 commits August 8, 2021 01:48
- 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
- added current_thread_id to thread
- updated timer to prevent join call on callback thread if we're on that thread
- tweaks to wait_for to allow a wider option of timer values not just milliseconds
- 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
@tsmoreland tsmoreland added bug Something isn't working enhancement New feature or request labels Aug 16, 2021
@tsmoreland tsmoreland merged commit 115e202 into main Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant