Changeset 29

Show
Ignore:
Timestamp:
11/28/04 14:07:30 (18 years ago)
Author:
wagi
Message:

asyncCall: call WorkerThread? with Functor.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freebob/src/threads.h

    r20 r29  
    2121#ifndef THREADS_H 
    2222#define THREADS_H 
     23 
     24#include "workerthread.h" 
    2325 
    2426class Functor 
     
    9698 
    9799template< typename CalleePtr, typename Callee,  typename Ret > 
    98 inline Functor* asyncCall( const CalleePtr& pCallee, 
     100inline void asyncCall( const CalleePtr& pCallee, 
    99101                           Ret( Callee::*pFunction )( ) ) 
    100102{ 
    101     // XXX dw: the functor has to be added to worker thread.  this here 
    102     // is just an idea. 
    103     StreamProcess::instance()->addToQueue(new MemberFunctor0< CalleePtr, Ret ( Callee::* )( ) > ( pCallee,  pFunction )); 
     103    WorkerThread::instance()->addFunctor(new MemberFunctor0< CalleePtr, Ret ( Callee::* )( ) > ( pCallee,  pFunction )); 
    104104} 
    105105