Skip to content

Commit

Permalink
Add xtd::threading::timer class
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Aug 15, 2023
1 parent 9ab7df2 commit 6a069be
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/xtd.core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ add_sources(
include/xtd/threading/thread_state
include/xtd/threading/thread_state_exception.h
include/xtd/threading/thread_state_exception
include/xtd/threading/timer.h
include/xtd/threading/timer
include/xtd/threading/timer_callback.h
include/xtd/threading/timer_callback
include/xtd/threading/timeout.h
Expand Down Expand Up @@ -913,6 +915,7 @@ add_sources(
src/xtd/threading/thread.cpp
src/xtd/threading/thread_pool.cpp
src/xtd/threading/timeout.cpp
src/xtd/threading/timer.cpp
src/xtd/threading/unnamed_event_wait_handle.h
src/xtd/threading/unnamed_mutex.h
src/xtd/threading/unnamed_semaphore.h
Expand Down
4 changes: 4 additions & 0 deletions src/xtd.core/include/xtd/threading/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ namespace xtd {
};

public:
/// @name Methods

/// @{
/// @brief Retrieves the difference between the maximum number of thread pool threads returned by the GetMaxThreads method, and the number currently active.
/// @param worker_threads The number of available worker threads
/// @param completion_port_threads The number of available asynchronous I/O threads.
Expand Down Expand Up @@ -169,6 +172,7 @@ namespace xtd {
/// @param completion_port_threads The new minimum number of idle asynchronous I/O threads to be maintained by the thread pool.
/// @return true if the change is successful; otherwise, false.
static bool set_min_threads(size_t worker_threads, size_t completion_port_threads);
/// @}

private:
static void asynchronous_io_run();
Expand Down
2 changes: 2 additions & 0 deletions src/xtd.core/include/xtd/threading/timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#pragma once
#include "timer.h"
Loading

0 comments on commit 6a069be

Please sign in to comment.