• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ postTask函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中postTask函数的典型用法代码示例。如果您正苦于以下问题:C++ postTask函数的具体用法?C++ postTask怎么用?C++ postTask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了postTask函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: RELEASE_ASSERT_WITH_SECURITY_IMPLICATION

void ScriptRunner::notifyScriptReady(ScriptLoader* scriptLoader, ExecutionType executionType)
{
    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(scriptLoader);
    switch (executionType) {
    case ASYNC_EXECUTION:
        // RELEASE_ASSERT makes us crash in a controlled way in error cases
        // where the ScriptLoader is associated with the wrong ScriptRunner
        // (otherwise we'd cause a use-after-free in ~ScriptRunner when it tries
        // to detach).
        RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(m_pendingAsyncScripts.contains(scriptLoader));

        m_pendingAsyncScripts.remove(scriptLoader);
        m_asyncScriptsToExecuteSoon.append(scriptLoader);

        postTask(BLINK_FROM_HERE);

        break;

    case IN_ORDER_EXECUTION:
        RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(m_numberOfInOrderScriptsWithPendingNotification > 0);
        m_numberOfInOrderScriptsWithPendingNotification--;

        while (!m_pendingInOrderScripts.isEmpty() && m_pendingInOrderScripts.first()->isReady()) {
            m_inOrderScriptsToExecuteSoon.append(m_pendingInOrderScripts.takeFirst());
            postTask(BLINK_FROM_HERE);
        }

        break;
    }
}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:30,代码来源:ScriptRunner.cpp


示例2: adoptPtr

blink::WebThread& HTMLParserThread::platformThread()
{
    if (!isRunning()) {
        m_thread = adoptPtr(blink::Platform::current()->createThread("HTMLParserThread"));
        postTask(WTF::bind(&HTMLParserThread::setupHTMLParserThread, this));
    }
    return *m_thread;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:8,代码来源:HTMLParserThread.cpp


示例3: mytimer_fired

void mytimer_fired(){

 
 postTask(dataTask,3);
//add
//PhotoTempM_ExternalPhotoADC_getData();
//PhotoTempM_ExternalPhotoADC_dataReady(6);

}
开发者ID:beartan,项目名称:liteOS,代码行数:9,代码来源:Main.c


示例4: postTask

void WorkerGlobalScope::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* state)
{
    if (!isContextThread()) {
        postTask(AddConsoleMessageTask::create(source, level, message));
        return;
    }
    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, sourceURL);
    addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, 0, state);
}
开发者ID:junmin-zhu,项目名称:blink-crosswalk,代码行数:9,代码来源:WorkerGlobalScope.cpp


示例5: postTask

void WorkerGlobalScope::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> prpConsoleMessage)
{
    RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = prpConsoleMessage;
    if (!isContextThread()) {
        postTask(AddConsoleMessageTask::create(consoleMessage->source(), consoleMessage->level(), consoleMessage->message()));
        return;
    }
    thread()->workerReportingProxy().reportConsoleMessage(consoleMessage);
    addMessageToWorkerConsole(consoleMessage.release());
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:10,代码来源:WorkerGlobalScope.cpp


示例6: postTask

void WorkerGlobalScope::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<ScriptCallStack>&& callStack, JSC::ExecState* state, unsigned long requestIdentifier)
{
    if (!isContextThread()) {
        postTask(AddConsoleMessageTask(source, level, StringCapture(message)));
        return;
    }

    thread().workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, columnNumber, sourceURL);
    addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, columnNumber, WTF::move(callStack), state, requestIdentifier);
}
开发者ID:clbr,项目名称:webkitfltk,代码行数:10,代码来源:WorkerGlobalScope.cpp


示例7: postTask

void WorkerGlobalScope::addConsoleMessage(std::unique_ptr<Inspector::ConsoleMessage> message)
{
    if (!isContextThread()) {
        postTask(AddConsoleMessageTask(message->source(), message->level(), StringCapture(message->message())));
        return;
    }

    thread().workerReportingProxy().postConsoleMessageToWorkerObject(message->source(), message->level(), message->message(), message->line(), message->column(), message->url());
    addMessageToWorkerConsole(WTFMove(message));
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:10,代码来源:WorkerGlobalScope.cpp


示例8: ASSERT

void HTMLParserThread::postTask(PassOwnPtr<CrossThreadClosure> closure)
{
    ASSERT(isMainThread());
    if (!m_thread) {
        m_thread = WebThreadSupportingGC::create("HTMLParserThread");
        postTask(threadSafeBind(&HTMLParserThread::setupHTMLParserThread, AllowCrossThreadAccess(this)));
    }

    m_thread->postTask(BLINK_FROM_HERE, closure);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:10,代码来源:HTMLParserThread.cpp


示例9: postTask

void WorkerGlobalScope::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier)
{
    if (!isContextThread()) {
        postTask(AddConsoleMessageTask::create(source, level, message));
        return;
    }

    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, 0, String());
    addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, 0, requestIdentifier);
}
开发者ID:JeStasG,项目名称:phantomjs,代码行数:10,代码来源:WorkerGlobalScope.cpp


示例10: resumeActiveDOMObjects

void ExecutionContext::resumeScheduledTasks()
{
    resumeActiveDOMObjects();
    tasksWereResumed();
    // We need finish stack unwiding before running next task because it can suspend this context.
    if (m_isRunSuspendableTasksScheduled)
        return;
    m_isRunSuspendableTasksScheduled = true;
    postTask(FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, this));
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:10,代码来源:ExecutionContext.cpp


示例11: ASSERT

void HTMLParserThread::postTask(std::unique_ptr<CrossThreadClosure> closure) {
  ASSERT(isMainThread());
  if (!m_thread) {
    m_thread = WebThreadSupportingGC::create("HTMLParserThread",
                                             BlinkGC::MainThreadHeapMode);
    postTask(crossThreadBind(&HTMLParserThread::setupHTMLParserThread,
                             crossThreadUnretained(this)));
  }

  m_thread->postTask(BLINK_FROM_HERE, std::move(closure));
}
开发者ID:mirror,项目名称:chromium,代码行数:11,代码来源:HTMLParserThread.cpp


示例12: TimerM_HandleFire

inline  
void TimerM_HandleFire(void)
{
  uint8_t i;
  uint16_t int_out;

  TimerM_setIntervalFlag = 1;


  { _atomic_t _atomic = _atomic_start();
    {
      int_out = TimerM_interval_outstanding;
      TimerM_interval_outstanding = 0;
    }
    _atomic_end(_atomic); }
  if (TimerM_mState) {
      for (i = 0; i < NUM_TIMERS; i++) {
          if (TimerM_mState & (0x1L << i)) {
              TimerM_mTimerList[i].ticksLeft -= int_out;
              if (TimerM_mTimerList[i].ticksLeft <= 2) {


                  if (postTask(TimerM_signalOneTimer, 7)) {
                      if (TimerM_mTimerList[i].type == TIMER_REPEAT) {
                          TimerM_mTimerList[i].ticksLeft += TimerM_mTimerList[i].ticks;
                        }
                      else 
                        {
                          TimerM_mState &= ~(0x1L << i);
                        }
                      TimerM_enqueue(i);
                    }
                  else {
                      {
                      }
                      ;


                      TimerM_mTimerList[i].ticksLeft = TimerM_mInterval;
                    }
                }
            }
        }
    }


  { _atomic_t _atomic = _atomic_start();
    int_out = TimerM_interval_outstanding;
    _atomic_end(_atomic); }
  if (int_out == 0) {
    TimerM_adjustInterval();
    }
}
开发者ID:beartan,项目名称:liteOS,代码行数:53,代码来源:TimerRaw.c


示例13: StandardSocketSend

//-------------------------------------------------------------------------
void StandardSocketSend(uint16_t port, uint16_t address, uint8_t msglength,
                        uint8_t * msg)
{
//    #ifdef PLATFORM_AVR_IRIS
//     sleepThread(20);
//    #endif

    radiosocketdata.socket_port = port;
    radiosocketdata.socket_addr = address;
    radiosocketdata.socket_msg_len = msglength;
    radiosocketdata.socket_msg = msg;
    postTask(send_task, 9);
    sleepThread(20);
    restoreRadioState();
    return;
}
开发者ID:beartan,项目名称:liteOS,代码行数:17,代码来源:socketradiodata.c


示例14: TimerM_Clock_fire

inline result_t TimerM_Clock_fire(void)
{
  { _atomic_t _atomic = _atomic_start();
    {

      if (TimerM_interval_outstanding == 0) {
        postTask(TimerM_HandleFire,7);
        }
      else {
        }
      ;

      TimerM_interval_outstanding += TimerM_Clock_getInterval() + 1;
    }
    _atomic_end(_atomic); }
  return SUCCESS;
}
开发者ID:beartan,项目名称:liteOS,代码行数:17,代码来源:TimerRaw.c


示例15: Standard_Receive_Packet

//Now this OS has a new packet, needs to deliver it to the correct thread for processing, and return the packet as soon as possible 
Radio_MsgPtr Standard_Receive_Packet(uint16_t port, Radio_MsgPtr packet){

	uint8_t i;

	  for (i=0;i<RECEIVE_HANDLE_NUM;i++)

      {

		if ((receivehandles[i].port  == port)&&(receivehandles[i].handlevalid == 1))
		
		{
		   uint8_t temp;
		   uint8_t j; 
		   uint8_t *buf; 
		   buf = (uint8_t*)receivehandles[i].data; 
		   
		   temp = ( packet->length > (receivehandles[i].maxLength)? (receivehandles[i].maxLength): packet->length); 
		
		   for (j=0;j<temp; j++)
		   	{
               *buf = packet->data[j];
			   buf++; 
		    }
		
		   if (receivehandles[i].packetinfo != NULL)
		   	{
              buf = (uint8_t*)receivehandles[i].packetinfo; 
			  *buf = packet->strength; 
			  buf++;
			  *buf = packet->lqi; 			  
		    }
		
		   if (receivehandles[i].handlefunc != NULL)
		   	 postTask(receivehandles[i].handlefunc, 6); 		   

           //if (*(receivehandles[i].dataReady) == 0) 
            *(receivehandles[i].dataReady) = temp;  
        
		 return packet; 
		}

    }		
   return packet; 		
}
开发者ID:beartan,项目名称:liteOS,代码行数:45,代码来源:PACKETHANDLER.C


示例16: postTask

void ScriptExecutionContext::processMessagePortMessagesSoon()
{
    postTask(ProcessMessagesSoonTask::create());
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:4,代码来源:ScriptExecutionContext.cpp


示例17: postTask

void IDBServer::postDatabaseTask(CrossThreadTask&& task)
{
    postTask(WTFMove(task));
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:4,代码来源:IDBServer.cpp


示例18: GenericTimerFired

//This function is called from the particular implementation!
//This function also contains platform related defintions 
//0, 1, 2, AND 10, 11 are reserved. User is suggested to start with id 20. 
inline result_t GenericTimerFired(uint8_t id)
{


    unsigned char result;
    
    //0, 1, 2 for threads
    switch (id)
    {
    case 0:
        ServiceTimerFired(0);
        break;
    case 1:
        ServiceTimerFired(1);
         break;
    case 2:
        ServiceTimerFired(2);
        break;
    case 3:
        ServiceTimerFired(3);
        break;
    case 4:
        ServiceTimerFired(4);
        break;
    case 5:
        ServiceTimerFired(5);
        break;
    case 6:
        ServiceTimerFired(6);
        break;
    case 7:
        ServiceTimerFired(7);
        break;
    case 9:

#ifdef PLATFORM_CPU_MEASURE
        
		cpucounter_history[loop++] = cpucounter; 
		cpucounter = 0; 
		if (loop == 20)
		loop = 0; 
             
        
#endif


        break;
#if defined(PLATFORM_AVR) && defined(RADIO_CC2420)
    case 10:
        hplcc2420interruptm_FIFOTimer_fired();
        break;
    case 11:
        hplcc2420interruptm_CCATimer_fired();
        break;
#endif
   case 12:
        #ifdef ENERGY_SHARE_SCHEDULING
        
         {energy_manager_increase_round();   
		  postTask(thread_task, 9);  
           
         }  
        #endif 		
			
		
	   break;  	  
    
	case 13:
        #ifdef TRACE_MEMORY_CONTENTS
          memoryReportTimerFired();
        #endif 
		
	    break; 
		
	case 14:
	    #ifdef TRACE_ENABLE
		 reportTrace();
		#endif 
		
		#ifdef BASE_MODE		
		restoreRadioState();
		#endif
	    
		break; 
		
	case 15:
	
		
		break; 	
		
	case 16:
	    
		#ifdef TRACE_MEMORY_CONTENTS
		  AMStandard_releaseLock();
		  lib_radio_set_channel(21); 
		 #endif 
		break;
//.........这里部分代码省略.........
开发者ID:EmuxEvans,项目名称:liteos,代码行数:101,代码来源:generictimer.c


示例19: postTask

void ExecutionContext::postSuspendableTask(PassOwnPtr<SuspendableTask> task)
{
    m_suspendedTasks.append(task);
    if (!m_activeDOMObjectsAreSuspended)
        postTask(FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, this));
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:6,代码来源:ExecutionContext.cpp



注:本文中的postTask函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ post_bootmode_get函数代码示例发布时间:2022-05-30
下一篇:
C++ postOrder函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap