Client Handler Subsystem
[Bio-SPHERE Daemon]

Collaboration diagram for Client Handler Subsystem:


Functions

bs_status init_threadsystem (apr_pool_t *mp)
void lets_go_threaded (void)
bs_status stop_daemon (bs_uint32 num_usecs)

Function Documentation

bs_status init_threadsystem ( apr_pool_t *  mp  ) 

Initialize the thread handling system.

Parameters:
mp Memory pool to use
Returns:
Status code indicating success or failure.

Definition at line 313 of file thread.c.

References init_listen_socket(), listener_socket, new_list(), and sockets.

Referenced by main().

Here is the call graph for this function:

void lets_go_threaded ( void   ) 

Start the main execution. The listening socket is initiated and the main thread starts listening for incoming connections. If there is a request, it will be serviced by a newly spawned worker thread.

There is some enforcement of a timeout on the worker threads. If they take too long, their socket will be closed resulting in a probable error and thus end of the thread.

Definition at line 358 of file thread.c.

References BIOSPHERED_MAX_CONNECTIONS, BS_OK, global_mp, list_size(), listener_socket, lock_thread_mux(), remove_oldest_thread(), runtestsuite::rv, setup_thread(), sockets, and unlock_thread_mux().

Referenced by main().

Here is the call graph for this function:

bs_status stop_daemon ( bs_uint32  num_usecs  ) 

Makes the daemon stop quite drastically. All the active sockets, including the listening socket are closed and the exit() function is called.

Parameters:
num_usecs The number of microseconds to wait before initiating the shutdown
Returns:
Status code.

Definition at line 449 of file thread.c.

References BS_ERROR, BS_OK, shutdown_info::pool, runtestsuite::rv, shutdown_thread_main(), and shutdown_info::wait_time.

Referenced by core_service_admin_shutdown().

Here is the call graph for this function:


Generated on Tue Jul 17 09:51:32 2007 for Bio-SPHERE by  doxygen 1.5.1