// @todo consider using blade_session_t via reference counting, rather than locking a mutex to simulate a reference count to halt cleanups while in use
// using actual reference counting would mean that mutexes would not need to be held locked when looking up a session by id just to prevent cleanup,
// instead cleanup would automatically occur when the last reference is actually removed (which SHOULD be at the end of the state machine thread),
// which is safer than another thread potentially waiting on the write lock to release while it's being destroyed, or external code forgetting to unlock
// then use short lived mutex or rwl for accessing the content of the session while it is referenced
// this approach should also be used for blade_connection_t, which has a similar threaded state machine