summaryrefslogtreecommitdiff
path: root/TAO/tests/Cubit/Orbix/tpr/tpr.cpp
blob: 415410aea9fd8716dab74d0c20213e746746c96e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "tpr.h"

void *
worker(void *vp)
{
  ACE_Thread_Control tc (ACE_Thread_Manager::instance ());
  CORBA::Orbix.continueThreadDispatch (*(CORBA::Request *)vp);
  return NULL;
}


int
tpr_filter::inRequestPreMarshal(CORBA::Request &r,  CORBA::Environment&)
{
//   thread_t	tid;
//   thr_create(NULL, 0, worker, (void *)&r, THR_DETACHED, &tid);

  ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();
  thr_mgr->spawn (ACE_THR_FUNC (worker),
                  (void *) &r, 
                  THR_DETACHED);

  return -1;
}

tpr_filter tpr_dispatcher;