Ejemplo n.º 1
0
        /// <summary>
        /// Returns true (1) if called on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
        /// </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 CurrentlyOn(CfxThreadId threadId)
        {
            var call = new CfxRuntimeCurrentlyOnRemoteCall();

            call.threadId = (int)threadId;
            call.RequestExecution();
            return(call.__retval);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true (1) if called on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
        /// </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 CurrentlyOn(CfxThreadId threadId)
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxRuntimeCurrentlyOnRemoteCall();

            call.threadId = (int)threadId;
            call.RequestExecution(connection);
            return(call.__retval);
        }