Contains thread native API. 
- Namespace
 - xtd::native 
 
- Library
 - xtd.core.native
 
- Warning
 - Internal use only 
 
 | 
| static bool  | cancel (intmax_t handle) | 
|   | Cancel thread with specified handle.  
  | 
|   | 
| static intmax_t  | create (std::function< void(intmax_t)> start, intmax_t obj, int32_t max_stack_size, bool suspended, intmax_t &id) | 
|   | Cancel thread with specified handle.  
  | 
|   | 
| static bool  | detach (intmax_t handle) | 
|   | Detach thread with specified handle.  
  | 
|   | 
| static intmax_t  | get_current_thread_handle () | 
|   | Gets the current thread handle.  
  | 
|   | 
| static intmax_t  | get_thread_id (intmax_t handle) | 
|   | Gets the thread id.  
  | 
|   | 
| static bool  | join (intmax_t handle) | 
|   | Join thread with specified handle.  
  | 
|   | 
| static bool  | resume (intmax_t handle) | 
|   | Resume thread with specified handle.  
  | 
|   | 
| static bool  | set_current_thread_name (const std::string &name) | 
|   | Sets the current thread name.  
  | 
|   | 
| static bool  | set_priority (intmax_t handle, int32_t priority) | 
|   | Sets the thread priority.  
  | 
|   | 
| static void  | sleep (int32_t milliseconds_timeout) | 
|   | Suspends the current thread for a specified time.  
  | 
|   | 
| static bool  | suspend (intmax_t handle) | 
|   | Suspend thread with specified handle.  
  | 
|   | 
| static bool  | yield () | 
|   | Causes the calling thread to yield execution to another thread that is ready to run on the current processor.  
  | 
|   | 
◆ cancel()
  
  
      
        
          | static bool xtd::native::thread::cancel  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Cancel thread with specified handle. 
- Parameters
 - 
  
  
 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ create()
  
  
      
        
          | static intmax_t xtd::native::thread::create  | 
          ( | 
          std::function< void(intmax_t)>  | 
          start,  | 
         
        
           | 
           | 
          intmax_t  | 
          obj,  | 
         
        
           | 
           | 
          int32_t  | 
          max_stack_size,  | 
         
        
           | 
           | 
          bool  | 
          suspended,  | 
         
        
           | 
           | 
          intmax_t &  | 
          id  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Cancel thread with specified handle. 
- Parameters
 - 
  
    | start | The function to run in the new thread created.  | 
    | obj | The argument of the start function.  | 
    | max_stack_size | The maximum stack size, in bytes, to be used by the thread, or 0 to use the default maximum stack size specified in the header for the executable.  | 
  
   
- Returns
 - The thread handle. 
 
- Warning
 - Internal use only 
 
 
 
◆ detach()
  
  
      
        
          | static bool xtd::native::thread::detach  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Detach thread with specified handle. 
- Parameters
 - 
  
  
 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ get_current_thread_handle()
  
  
      
        
          | static intmax_t xtd::native::thread::get_current_thread_handle  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Gets the current thread handle. 
- Returns
 - The current thread handle. 
 
- Warning
 - Internal use only 
 
 
 
◆ get_thread_id()
  
  
      
        
          | static intmax_t xtd::native::thread::get_thread_id  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Gets the thread id. 
- Parameters
 - 
  
  
 
- Returns
 - The current thread id. 
 
- Warning
 - Internal use only 
 
 
 
◆ join()
  
  
      
        
          | static bool xtd::native::thread::join  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Join thread with specified handle. 
- Parameters
 - 
  
  
 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ resume()
  
  
      
        
          | static bool xtd::native::thread::resume  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Resume thread with specified handle. 
- Parameters
 - 
  
  
 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ set_current_thread_name()
  
  
      
        
          | static bool xtd::native::thread::set_current_thread_name  | 
          ( | 
          const std::string &  | 
          name | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Sets the current thread name. 
- Parameters
 - 
  
    | name | The current thread name.  | 
  
   
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ set_priority()
  
  
      
        
          | static bool xtd::native::thread::set_priority  | 
          ( | 
          intmax_t  | 
          handle,  | 
         
        
           | 
           | 
          int32_t  | 
          priority  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Sets the thread priority. 
- Parameters
 - 
  
    | handle | The thread handle.  | 
    | priority | The thread priority.  | 
  
   
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ sleep()
  
  
      
        
          | static void xtd::native::thread::sleep  | 
          ( | 
          int32_t  | 
          milliseconds_timeout | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Suspends the current thread for a specified time. 
- Parameters
 - 
  
    | milliseconds_timeout | The number of milliseconds for which the thread is blocked. Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute. Specify -1 to block the thread indefinitely.  | 
  
   
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ suspend()
  
  
      
        
          | static bool xtd::native::thread::suspend  | 
          ( | 
          intmax_t  | 
          handle | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Suspend thread with specified handle. 
- Parameters
 - 
  
  
 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ yield()
  
  
      
        
          | static bool xtd::native::thread::yield  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Causes the calling thread to yield execution to another thread that is ready to run on the current processor. 
- Returns
 - true if succeed; otherwise false. 
 
- Warning
 - Internal use only 
 
 
 
The documentation for this class was generated from the following file: