From: Karel G. <kg...@us...> - 2001-11-24 19:45:29
|
Update of /cvsroot/micomt/mico/include/mico In directory usw-pr-cvs1:/tmp/cvs-serv31239/include/mico Modified Files: iop.h mt_manager.h Log Message: - fixed compilation of final build - fixed --enable-threads configure option - fixed server scalability problem with thread-pool concurrency model which uses separate reader/writer threads for each GIOP connection Index: iop.h =================================================================== RCS file: /cvsroot/micomt/mico/include/mico/iop.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** iop.h 2001/10/26 19:59:59 1.33 --- iop.h 2001/11/24 19:45:26 1.34 *************** *** 372,375 **** --- 372,378 ---- MICOMT::Mutex _excl_mutex; + CORBA::Boolean _M_use_reader_thread; + CORBA::Boolean _M_use_writer_thread; + CORBA::Boolean input_ready(); void close_connection(); *************** *** 393,400 **** void output_handler (CORBA::Buffer *); - GIOPConn (CORBA::Dispatcher *, CORBA::Transport *, GIOPConnCallback *, - GIOPCodec *, CORBA::Long tmout = 0, CORBA::ULong max_size = 0); #ifdef HAVE_THREADS void terminate(); #endif virtual ~GIOPConn (); --- 396,409 ---- void output_handler (CORBA::Buffer *); #ifdef HAVE_THREADS void terminate(); + + GIOPConn (CORBA::Dispatcher *, CORBA::Transport *, GIOPConnCallback *, + GIOPCodec *, CORBA::Long tmout = 0, CORBA::ULong max_size = 0, + CORBA::Boolean __reader_thread = FALSE, + CORBA::Boolean __writer_thread = FALSE); + #else + GIOPConn (CORBA::Dispatcher *, CORBA::Transport *, GIOPConnCallback *, + GIOPCodec *, CORBA::Long tmout = 0, CORBA::ULong max_size = 0); #endif virtual ~GIOPConn (); *************** *** 404,417 **** void output (CORBA::Buffer *); ! CORBA::Boolean check_events () { return FALSE; }; ! void ref () { _refcnt++; }; CORBA::Boolean deref (CORBA::Boolean all = FALSE); ! void get_exclusive () { _excl_mutex.lock(); }; ! void release_exclusive () { _excl_mutex.unlock(); }; #else ! void start() {}; ! void output (CORBA::Buffer *b) { output_handler(b); }; CORBA::Boolean check_events (); --- 413,434 ---- void output (CORBA::Buffer *); ! CORBA::Boolean check_events () ! { return FALSE; }; ! void ref () ! { _refcnt++; }; CORBA::Boolean deref (CORBA::Boolean all = FALSE); ! void get_exclusive () ! { _excl_mutex.lock(); }; ! ! void release_exclusive () ! { _excl_mutex.unlock(); }; #else ! void start() ! {}; ! ! void output (CORBA::Buffer *b) ! { this->output_handler(b); }; CORBA::Boolean check_events (); *************** *** 420,425 **** CORBA::Boolean deref (CORBA::Boolean all = FALSE); ! void get_exclusive () {}; ! void release_exclusive () {}; #endif --- 437,444 ---- CORBA::Boolean deref (CORBA::Boolean all = FALSE); ! void get_exclusive () ! {}; ! void release_exclusive () ! {}; #endif *************** *** 672,678 **** void kill_conn (GIOPConn *, CORBA::Boolean redo = FALSE); ! #ifndef HAVE_THREADS virtual CORBA::Dispatcher* Dispatcher(); - #endif }; --- 691,696 ---- void kill_conn (GIOPConn *, CORBA::Boolean redo = FALSE); ! virtual CORBA::Dispatcher* Dispatcher(); }; *************** *** 817,823 **** void kill_conn (GIOPConn *, CORBA::Boolean redo = FALSE); ! #ifndef HAVE_THREADS ! virtual CORBA::Dispatcher *Dispatcher(); ! #endif }; --- 835,840 ---- void kill_conn (GIOPConn *, CORBA::Boolean redo = FALSE); ! ! virtual CORBA::Dispatcher* Dispatcher(); }; Index: mt_manager.h =================================================================== RCS file: /cvsroot/micomt/mico/include/mico/mt_manager.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** mt_manager.h 2001/10/26 19:59:59 1.27 --- mt_manager.h 2001/11/24 19:45:26 1.28 *************** *** 450,467 **** class MTManager { ! static CORBA::Long _S_thread_model; public: ! enum ThreadModel { ! ThreadPool, ! ThreadPerConnection, ! ThreadPerRequest }; static void ! set_thread_model(MICO::MTManager::ThreadModel __model); static CORBA::Long ! get_thread_model(); static CORBA::Boolean --- 450,467 ---- class MTManager { ! static CORBA::Long _S_concurrency_model; public: ! enum ConcurrencyModel { ! _S_thread_pool, ! _S_thread_per_connection, ! _S_thread_per_request }; static void ! concurrency_model(MICO::MTManager::ConcurrencyModel __model); static CORBA::Long ! concurrency_model(); static CORBA::Boolean |