Added spinlock protection for the session association to the DCB and
reworked the reference count mechanism on the session. Introduced a FREE state for the session and alter the session destruction flow so that we only remove the session when all the DCB's have singled they have finished processing events for the DCB rather than when the first thread decides to clsoe the DCB.
This commit is contained in:
@ -53,7 +53,8 @@ typedef enum {
|
||||
SESSION_STATE_ALLOC,
|
||||
SESSION_STATE_READY,
|
||||
SESSION_STATE_LISTENER,
|
||||
SESSION_STATE_LISTENER_STOPPED
|
||||
SESSION_STATE_LISTENER_STOPPED,
|
||||
SESSION_STATE_FREE
|
||||
} session_state_t;
|
||||
|
||||
/**
|
||||
@ -87,4 +88,5 @@ extern void printSession(SESSION *);
|
||||
extern void dprintAllSessions(struct dcb *);
|
||||
extern void dprintSession(struct dcb *, SESSION *);
|
||||
extern char *session_state(int);
|
||||
extern bool session_link_dcb(SESSION *, struct dcb *);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user