| Index: include/v8-platform.h
|
| diff --git a/include/v8-platform.h b/include/v8-platform.h
|
| index 4fbef0f5d96bb49ce6a473d715145f614023224a..11f8d51f02573e1f3ea32a2efba21635ffa25e6d 100644
|
| --- a/include/v8-platform.h
|
| +++ b/include/v8-platform.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef V8_V8_PLATFORM_H_
|
| #define V8_V8_PLATFORM_H_
|
|
|
| +#include <stddef.h>
|
| #include <stdint.h>
|
|
|
| namespace v8 {
|
| @@ -56,6 +57,15 @@ class Platform {
|
| virtual ~Platform() {}
|
|
|
| /**
|
| + * Gets the number of threads that are used to execute background tasks. Is
|
| + * used to estimate the number of tasks a work package should be split into.
|
| + * A return value of 0 means that there are no background threads available.
|
| + * Note that a value of 0 won't prohibit V8 from posting tasks using
|
| + * |CallOnBackgroundThread|.
|
| + */
|
| + virtual size_t NumberOfAvailableBackgroundThreads() { return 0; }
|
| +
|
| + /**
|
| * Schedules a task to be invoked on a background thread. |expected_runtime|
|
| * indicates that the task will run a long time. The Platform implementation
|
| * takes ownership of |task|. There is no guarantee about order of execution
|
|
|