forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsThreadServiceCallback.cs
More file actions
18 lines (17 loc) · 886 Bytes
/
JsThreadServiceCallback.cs
File metadata and controls
18 lines (17 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
namespace JavaScriptEngineSwitcher.ChakraCore.JsRt
{
/// <summary>
/// The thread service callback
/// </summary>
/// <remarks>
/// The host can specify a background thread service when creating a runtime. If
/// specified, then background work items will be passed to the host using this callback. The
/// host is expected to either begin executing the background work item immediately and return
/// true or return false and the runtime will handle the work item in-thread.
/// </remarks>
/// <param name="callbackFunction">The callback for the background work item</param>
/// <param name="callbackData">The data argument to be passed to the callback</param>
/// <returns>Whether the thread service will execute the callback</returns>
internal delegate bool JsThreadServiceCallback(JsBackgroundWorkItemCallback callbackFunction, IntPtr callbackData);
}