//C++ TO C# CONVERTER TODO TASK: C# has no equivalent to ' = delete':
//  ContextGroup(const ContextGroup&) = delete;
//C++ TO C# CONVERTER TODO TASK: 'rvalue references' have no equivalent in C#:
        public ContextGroup(ContextGroup && other)
        {
            this.dispatcher = other.dispatcher;
            if (dispatcher != null)
            {
                Debug.Assert(other.contextGroup.firstContext == null);
                contextGroup.firstContext = null;
                other.dispatcher          = null;
            }
        }
Exemple #2
0
        public ContextGroupTimeout(Dispatcher dispatcher, ContextGroup contextGroup, std::chrono.nanoseconds timeout)
        {
            this.workingContextGroup = dispatcher;
            this.timeoutTimer        = dispatcher;
//C++ TO C# CONVERTER TODO TASK: Only lambda expressions having all locals passed by reference can be converted to C#:
//ORIGINAL LINE: workingContextGroup.spawn([&, timeout]
            workingContextGroup.spawn(() =>
            {
                try
                {
                    timeoutTimer.sleep(timeout);
                    contextGroup.interrupt();
                }
                catch (InterruptedException)
                {
                }
            });
        }