Пример #1
0
 public void Dispose()
 {
     if (_session != null)
     {
         _session.Disposed -= OnSessionDisposed;
         _session.Dispose();
         _session = null;
     }
 }
Пример #2
0
        internal async Task ReleaseSession(IRSession session)
        {
            if (session == null)
            {
                return;
            }
            await _sem.WaitAsync();

            if (_disposed || _freeSessions.Count >= MaxFreeSessions || !session.IsHostRunning)
            {
                session.Dispose();
            }
            else
            {
                _freeSessions.Add(session);
            }
            _sem.Release();
        }
 public void Dispose()
 {
     _workflow.RSession.Mutated -= OnInteractiveSessionMutated;
     Session?.Dispose();
     Session = null;
 }
Пример #4
0
 public void Dispose() => _session?.Dispose();
Пример #5
0
 public void Dispose()
 {
     _evaluation.Dispose();
     _session.StopHostAsync().ContinueWith(t => _session.Dispose());
 }