示例#1
0
        /// <summary>
        /// Post a task for execution on the thread associated with this task runner.
        /// Execution will occur asynchronously.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public bool PostTask(CfxTask task)
        {
            var __retval = CfxApi.TaskRunner.cfx_task_runner_post_task(NativePtr, CfxTask.Unwrap(task));

            GC.KeepAlive(task);
            return(0 != __retval);
        }
示例#2
0
 /// <summary>
 /// Post a task for execution on the specified thread. Equivalent to using
 /// CfxTaskRunner.GetForThread(threadId).PostTask(task).
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool PostTask(CfxThreadId threadId, CfxTask task)
 {
     return(0 != CfxApi.cfx_post_task((int)threadId, CfxTask.Unwrap(task)));
 }
示例#3
0
 /// <summary>
 /// Post a task for delayed execution on the specified thread. Equivalent to
 /// using CfxTaskRunner.GetForThread(threadId).PostDelayedTask(task,
 /// delay_ms).
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool PostDelayedTask(CfxThreadId threadId, CfxTask task, long delayMs)
 {
     return(0 != CfxApi.cfx_post_delayed_task((int)threadId, CfxTask.Unwrap(task), delayMs));
 }
示例#4
0
 /// <summary>
 /// Post a task for delayed execution on the thread associated with this task
 /// runner. Execution will occur asynchronously. Delayed tasks are not
 /// supported on V8 WebWorker threads and will be executed without the
 /// specified delay.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public bool PostDelayedTask(CfxTask task, long delayMs)
 {
     return(0 != CfxApi.cfx_task_runner_post_delayed_task(NativePtr, CfxTask.Unwrap(task), delayMs));
 }
示例#5
0
 /// <summary>
 /// Post a task for execution on the thread associated with this task runner.
 /// Execution will occur asynchronously.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public bool PostTask(CfxTask task)
 {
     return(0 != CfxApi.cfx_task_runner_post_task(NativePtr, CfxTask.Unwrap(task)));
 }
示例#6
0
        /// <summary>
        /// Post a task for delayed execution on the thread associated with this task
        /// runner. Execution will occur asynchronously. Delayed tasks are not
        /// supported on V8 WebWorker threads and will be executed without the
        /// specified delay.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public bool PostDelayedTask(CfxTask task, long delayMs)
        {
            var __retval = CfxApi.TaskRunner.cfx_task_runner_post_delayed_task(NativePtr, CfxTask.Unwrap(task), delayMs);

            GC.KeepAlive(task);
            return(0 != __retval);
        }