Add a mechanism to synchronize persistent pool counts
The polling system now has a concept of messages. This can be used to send a synchronous message to the polling system which waits for all threads to process the message before returning. Currently this is used to flush unused DCBs when server persistent statistics are reported.
This commit is contained in:
@ -52,6 +52,11 @@ typedef enum
|
||||
POLL_STAT_MAX_EXECTIME
|
||||
} POLL_STAT;
|
||||
|
||||
enum poll_message
|
||||
{
|
||||
POLL_MSG_CLEAN_PERSISTENT = 0x01
|
||||
};
|
||||
|
||||
extern void poll_init();
|
||||
extern int poll_add_dcb(DCB *);
|
||||
extern int poll_remove_dcb(DCB *);
|
||||
@ -71,5 +76,6 @@ extern void poll_fake_event(DCB *dcb, enum EPOLL_EVENTS ev);
|
||||
extern void poll_fake_hangup_event(DCB *dcb);
|
||||
extern void poll_fake_write_event(DCB *dcb);
|
||||
extern void poll_fake_read_event(DCB *dcb);
|
||||
extern void poll_send_message(enum poll_message msg, void *data);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
Reference in New Issue
Block a user