renamed stop to halt in some context.
renamed start to execute in TcpServer
This commit is contained in:
@ -861,8 +861,8 @@ public:
|
||||
operator Awk* () const;
|
||||
operator rtx_t* () const;
|
||||
|
||||
void stop () const;
|
||||
bool isStop () const;
|
||||
void halt () const;
|
||||
bool isHalt () const;
|
||||
|
||||
errnum_t getErrorNumber () const;
|
||||
loc_t getErrorLocation () const;
|
||||
@ -1047,9 +1047,9 @@ public:
|
||||
);
|
||||
|
||||
///
|
||||
/// The stop() function makes request to abort execution
|
||||
/// The halt() function makes request to abort execution
|
||||
///
|
||||
void stop ();
|
||||
void halt ();
|
||||
/// \}
|
||||
|
||||
///
|
||||
|
@ -2344,26 +2344,26 @@ QSE_EXPORT qse_awk_val_t* qse_awk_rtx_callwithstrs (
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_stopall() function aborts all active runtime contexts
|
||||
* The qse_awk_haltall() function aborts all active runtime contexts
|
||||
* associated with \a awk.
|
||||
*/
|
||||
QSE_EXPORT void qse_awk_stopall (
|
||||
QSE_EXPORT void qse_awk_haltall (
|
||||
qse_awk_t* awk /**< awk */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_rtx_isstop() function tests if qse_awk_rtx_stop() has been
|
||||
* The qse_awk_rtx_ishalt() function tests if qse_awk_rtx_halt() has been
|
||||
* called.
|
||||
*/
|
||||
QSE_EXPORT int qse_awk_rtx_isstop (
|
||||
QSE_EXPORT int qse_awk_rtx_ishalt (
|
||||
qse_awk_rtx_t* rtx /**< runtime context */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_rtx_stop() function causes an active runtime context \a rtx to
|
||||
* The qse_awk_rtx_halt() function causes an active runtime context \a rtx to
|
||||
* be aborted.
|
||||
*/
|
||||
QSE_EXPORT void qse_awk_rtx_stop (
|
||||
QSE_EXPORT void qse_awk_rtx_halt (
|
||||
qse_awk_rtx_t* rtx /**< runtime context */
|
||||
);
|
||||
|
||||
|
@ -201,17 +201,17 @@ public:
|
||||
int execute (Stream& iostream);
|
||||
|
||||
///
|
||||
/// The stop() function makes a request to break a running loop
|
||||
/// The halt() function makes a request to break a running loop
|
||||
/// inside execute(). Note that this does not affect blocking
|
||||
/// operations in user-defined stream handlers.
|
||||
///
|
||||
void stop ();
|
||||
void halt ();
|
||||
|
||||
///
|
||||
/// The isStop() function returns true if stop() has been called
|
||||
/// The isHalt() function returns true if halt() has been called
|
||||
/// since the last call to execute(), false otherwise.
|
||||
///
|
||||
bool isStop () const;
|
||||
bool isHalt () const;
|
||||
|
||||
///
|
||||
/// The getTrait() function gets the current traits.
|
||||
|
@ -644,17 +644,17 @@ QSE_EXPORT int qse_sed_exec (
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sed_stop() function breaks running loop in qse_sed_exec().
|
||||
* The qse_sed_halt() function breaks running loop in qse_sed_exec().
|
||||
* It doesn't affect blocking calls in stream handlers.
|
||||
*/
|
||||
QSE_EXPORT void qse_sed_stop (
|
||||
QSE_EXPORT void qse_sed_halt (
|
||||
qse_sed_t* sed /**< stream editor */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sed_isstop() functions tests if qse_sed_stop() is called.
|
||||
* The qse_sed_ishalt() functions tests if qse_sed_halt() is called.
|
||||
*/
|
||||
QSE_EXPORT int qse_sed_isstop (
|
||||
QSE_EXPORT int qse_sed_ishalt (
|
||||
qse_sed_t* sed /**< stream editor */
|
||||
);
|
||||
|
||||
|
@ -47,8 +47,8 @@ public:
|
||||
TcpServer (Mmgr* mmgr = QSE_NULL) QSE_CPP_NOEXCEPT;
|
||||
virtual ~TcpServer () QSE_CPP_NOEXCEPT;
|
||||
|
||||
virtual int start (const qse_char_t* addrs) QSE_CPP_NOEXCEPT;
|
||||
virtual int stop () QSE_CPP_NOEXCEPT;
|
||||
virtual int execute (const qse_char_t* addrs) QSE_CPP_NOEXCEPT;
|
||||
virtual int halt () QSE_CPP_NOEXCEPT;
|
||||
|
||||
bool isServing () const QSE_CPP_NOEXCEPT
|
||||
{
|
||||
@ -57,11 +57,11 @@ public:
|
||||
|
||||
bool isStopRequested () const QSE_CPP_NOEXCEPT
|
||||
{
|
||||
return this->_stop_requested;
|
||||
return this->_halt_requested;
|
||||
}
|
||||
void setStopRequested (bool req) QSE_CPP_NOEXCEPT
|
||||
{
|
||||
this->_stop_requested = req;
|
||||
this->_halt_requested = req;
|
||||
}
|
||||
|
||||
qse_size_t getMaxConnections () const QSE_CPP_NOEXCEPT
|
||||
@ -117,7 +117,7 @@ public:
|
||||
Connection (Listener* listener) QSE_CPP_NOEXCEPT: listener(listener), prev_connection(QSE_NULL), next_connection(QSE_NULL), claimed(false), wid(_wid_map_t::WID_INVALID) {}
|
||||
|
||||
int main ();
|
||||
int stop () QSE_CPP_NOEXCEPT;
|
||||
int halt () QSE_CPP_NOEXCEPT;
|
||||
|
||||
Listener* getListener() QSE_CPP_NOEXCEPT { return this->listener; }
|
||||
const Listener* getListener() const QSE_CPP_NOEXCEPT { return this->listener; }
|
||||
@ -140,7 +140,7 @@ public:
|
||||
|
||||
QSE::Socket socket;
|
||||
QSE::SocketAddress address;
|
||||
QSE::SpinLock csspl; // spin lock for connection stop
|
||||
QSE::SpinLock csspl; // spin lock for connection halt
|
||||
};
|
||||
|
||||
private:
|
||||
@ -238,7 +238,7 @@ private:
|
||||
ListenerList _listener_list;
|
||||
ConnectionList _connection_list[2];
|
||||
QSE::SpinLock _connection_list_spl;
|
||||
bool _stop_requested;
|
||||
bool _halt_requested;
|
||||
bool _server_serving;
|
||||
qse_size_t _max_connections;
|
||||
qse_size_t _thread_stack_size;
|
||||
|
Reference in New Issue
Block a user