## Task::RunSynchronously() method


Runs the task synchronously on the current thread.

```cpp
void System::Threading::Tasks::Task::RunSynchronously()
```


## See Also

* Class [Task](../)
* Namespace [System::Threading::Tasks](../../)
* Library [Aspose.PDF for C++](../../../)
## Task::RunSynchronously(const SharedPtr\<TaskScheduler\>\&) method


Runs the task synchronously using the specified scheduler.

```cpp
void System::Threading::Tasks::Task::RunSynchronously(const SharedPtr<TaskScheduler> &scheduler)
```


| Parameter | Type | Description |
| --- | --- | --- |
| scheduler | const SharedPtr\<TaskScheduler\>\& | The scheduler to use for execution |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [TaskScheduler](../../taskscheduler/)
* Class [Task](../)
* Namespace [System::Threading::Tasks](../../)
* Library [Aspose.PDF for C++](../../../)
