Beispiel #1
0
        // TODO: Put in a timer that will make sure that running sessions that have
        // not been used for a time are closed.

        static internal void ReturnSession(DatabaseSession session)
        {
            lock (locker)
            {
                session.InUse = false;
            }
        }
Beispiel #2
0
        private DatabaseSession CreateSession(string database, object tag)
        {
            var retval = new DatabaseSession(database, this.host, this.port, this.Username, this.Password)
            {
                Tag = tag
            };

            return(retval);
        }
        // TODO: Put in a timer that will make sure that running sessions that have
        // not been used for a time are closed.

        static internal void ReturnSession(DatabaseSession session)
        {
            locker.WaitAsync();
            session.InUse = false;
            locker.Release();
        }